home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / DPTEST.ZIP;1 / README.2 < prev    next >
Encoding:
Text File  |  1993-02-09  |  136.8 KB  |  3,799 lines

  1.               Copyright WordPerfect Corporation 1993
  2.                        All Rights Reserved.
  3.  
  4. README.2                                                       02/01/93
  5.  
  6. This file is in DOS text format and is approximately 77 pages long.
  7. You should print this file using a mono-spaced font, such as
  8. Courier 10cpi.
  9.  
  10. €  Introduction
  11.  
  12.           DataPerfect Test Drive introduces you to the
  13.           DataPerfect database program.  This diskette contains
  14.           the same powerful program as DataPerfect, but it limits
  15.           the number of panels you can create to 4, and the number
  16.           of records you can add to each panel to 99.  Adding
  17.           password protection to a database you create with
  18.           DataPerfect Test Drive prevents that database from being
  19.           used with DataPerfect.
  20.  
  21.           By following the instructions in these README files,
  22.           you can learn the basics of designing, defining, and
  23.           using a database.  Because of the power and flexibility
  24.           of DataPerfect, not all features or applications of the
  25.           program can be covered in the README files.
  26.  
  27.           README.1 contains an overview of the DataPerfect
  28.           program, as well as lessons to help you become familiar
  29.           with using a database.  If you are not familiar with
  30.           DataPerfect, you should complete these lessons before
  31.           moving on to the lessons in README.2.
  32.  
  33.           README.2 contains lessons for defining a database.  The
  34.           database you create is called CLIENT, and is identical
  35.           to the CLIENT2 database included on the DataPerfect Test
  36.           Drive diskette.
  37.  
  38.           If you need help while using the DataPerfect Test Drive,
  39.           press Help (F3) for information.  Pressing Help (F3)
  40.           twice will display an on-screen template of DataPerfect
  41.           function keys.  Pressing Help (F3) three times will
  42.           display a list of features and keystrokes. €  Creating a Database 1:  Deciding What You Want
  43.  
  44.           Proper design is a key ingredient in creating a usable
  45.           database.  Time spent with a note pad and pen before
  46.           actually turning on a computer will save effort and
  47.           frustration in the long run.
  48.  
  49.           In this lesson, you look at the basic design
  50.           considerations involved in creating a database that
  51.           will fill a specific set of needs. The database you
  52.           design will keep track of customer, inventory, invoice,
  53.           and billing information for HALVA International.
  54.  
  55.   Concepts
  56.  
  57.           While reading through this lesson, you are introduced
  58.           to the following concepts:
  59.  
  60.           -    The design of a database and the information it
  61.                needs to contain depend on how it will be used.
  62.           -    A report can be used to extract information from
  63.                a database.  Report capability should be
  64.                considered when designing a database.
  65.           -    A field is the smallest unit of information in a
  66.                database.
  67.  
  68.   Assess Your Needs
  69.  
  70.           The first step in designing a database is to ask the
  71.           question, "What do I need to get out of the database?" 
  72.           It is helpful to list these items based on the
  73.           following considerations:  (1) What kind of information
  74.           do I need to be able to look up on-screen?  (2) What
  75.           kind of reports do I need?
  76.  
  77.           Some database applications require information for on-
  78.           screen reference only.  Most applications, however,
  79.           require both on-screen reference and some method of
  80.           extracting information from the database.
  81.  
  82.           A report is one way of extracting information from a
  83.           database.  This information can include names and
  84.           addresses formatted for labels, information sorted
  85.           according to specified headings, merge files for use
  86.           with WordPerfect, etc.  A report can be printed, sent
  87.           to the screen, or stored on disk.
  88.  
  89.           HALVA International needs a database to keep track of
  90.           mail order customers who purchase music boxes.  The
  91.           database needs to generate invoices, mailing labels,
  92.           billing reports, and lists of outstanding accounts. 
  93.           Because HALVA periodically sends catalogs and
  94.           promotional material to specific groups of customers,
  95.           the database must be able to sort customer records by
  96.           name, state, ZIP Code, purchase dates, and so forth, and
  97.           be able to generate form letters.  A list of HALVA's
  98.           needs from a database would appear as follows:
  99.  
  100.                Customer Personal Information
  101.                Customer Payments
  102.                Customer Purchases
  103.                Invoices
  104.                Inventory
  105.                Mailing Lists/Labels
  106.                Billing Reports
  107.                Print Invoices
  108.                WordPerfect Secondary Merge Capabilities
  109.                Form Letters
  110.  
  111.   Decide What Data Is Necessary
  112.  
  113.           Once you have determined what you want from a database,
  114.           determining the types of data it will need to contain
  115.           is quite easy.
  116.  
  117.           Based on the above list of needs, the HALVA database
  118.           will need to contain the following groups of data:
  119.  
  120.                Customer Information
  121.                Payments
  122.                Invoices
  123.                Inventory
  124.                Items Purchased
  125.  
  126.   Break Down the Information
  127.  
  128.           The next step is to break down the necessary data into
  129.           the smallest possible units.  For example, the customer
  130.           information can be broken down into the following:
  131.  
  132.                First Name
  133.                Middle Name
  134.                Last Name
  135.                Customer ID
  136.                Address
  137.                City
  138.                State
  139.                ZIP Code
  140.  
  141.           Each of these small units of information will be a
  142.           field when you create the database.
  143.  
  144.           Now you can break down the other categories of
  145.           information into the smallest units.  The data for
  146.           HALVA International's database can be broken down into
  147.           the following fields:
  148.  
  149.           Customer ID    Comments            Quantity Purchased
  150.           First Name     Last Invoice Date   Price of Item
  151.           Middle Name    Balance Due         Extended Price
  152.           Last Name      Invoice Number      Product Name
  153.           Address        Invoice Date        Cost of Product/Unit
  154.           City, State    Subtotal Price      Payment Date
  155.           Zip Code       Tax Amount          Payment Amount
  156.           Home Phone     Total Price
  157.           Work Phone     Item Purchased
  158.  
  159.   Review
  160.  
  161.           After reading this lesson, you should be able to answer
  162.           the following questions:
  163.  
  164.           -    What is the first step in designing a database?
  165.           -    How do you decide what kind of data to include in
  166.                a database?
  167.           -    What is a field? €  Creating a Database 2:  Grouping Data
  168.  
  169.           In this lesson you divide the list of fields from
  170.           Lesson 1:  Deciding, what you want into related groups. 
  171.           Each group will become a panel in the HALVA's completed
  172.           database.  This database will be called CLIENT.
  173.  
  174.   Concepts
  175.  
  176.           While reading through this lesson, you are introduced
  177.           to the following concepts:
  178.  
  179.           -    Related fields are displayed in a panel.
  180.           -    Normalization is the process of dividing related
  181.                fields into groups.
  182.           -    Panels containing one or more common fields can be
  183.                linked.
  184.  
  185.   Group the Information
  186.  
  187.           After you have created a list of fields for a database,
  188.           you need to divide those fields into related groups. 
  189.           For example, customer ID, first name, last name,
  190.           address, city, state, ZIP Code, and phone number are
  191.           all related to each other and should be grouped
  192.           together.  Elements such as invoice numbers, invoice
  193.           dates, items purchased, and purchase amounts are
  194.           related to each other and should be grouped together. 
  195.           This process of dividing the data into groups is called
  196.           normalization.  Properly normalized files are what give
  197.           databases their tremendous flexibility.
  198.  
  199.           Each group of related fields will become a panel when
  200.           you actually create the database.  You may want to name
  201.           each list with the name you plan to give its panel.
  202.  
  203.                CUSTOMER INFORMATION
  204.  
  205.                Customer I.D.#
  206.                First Name
  207.                Middle Name
  208.                Last Name
  209.                Address
  210.                City
  211.                State
  212.                Zip Code
  213.                Home Phone
  214.                Work Phone
  215.                Notes/Comments
  216.                Last Invoice Date
  217.                Balance Due
  218.  
  219.           In this case, because all of the customer information
  220.           is contained in one panel, customer records may be
  221.           sorted by the customer ID, last name, state, etc.  This
  222.           will let HALVA International sort or look up customer
  223.           records in a variety of ways.  The same is true of the
  224.           other panels in the database.
  225.  
  226.                INVOICE INFORMATION
  227.  
  228.                Customer I.D.#
  229.                Customer Name
  230.                Invoice Number
  231.                Invoice Date
  232.                Subtotal Price
  233.                Tax Amount
  234.                Total Price
  235.  
  236.  
  237.                CUSTOMER PAYMENTS
  238.  
  239.                Customer I.D.#
  240.                Customer Name
  241.                Payment Date
  242.                Payment Amount
  243.  
  244.  
  245.                ITEMS PURCHASED BY CUSTOMER
  246.  
  247.                Invoice Number
  248.                Item
  249.                Item Price
  250.                Quantity
  251.                Extended Price
  252.  
  253.  
  254.                INVENTORY
  255.  
  256.                Item
  257.                Item Price
  258.  
  259.   Select Common Fields
  260.  
  261.           Now that you have listed the fields to be included in
  262.           each panel, you need to decide how the panels will
  263.           relate to each other.  Two panels which have one or
  264.           more fields in common can be linked.  A link lets you
  265.           move from a record in one panel to a related record in
  266.           another panel.   Panel links (±) are stand alone and
  267.           are generally used to connect records in a one-to-one
  268.           or one-to-many relationship.  Data links (which are
  269.           diamond shaped) are attached to fields and are generally
  270.           used to connect records in a many-to-one relationship.
  271.           Data links also allow data checking.
  272.  
  273.           Look at the lists of related fields for the CLIENT
  274.           database.  Notice that some of the fields already
  275.           belong to more than one group.  For example, the lists
  276.           for the Customer Information panel and the Invoices
  277.           panel both contain the Customer ID field.
  278.  
  279.                CUSTOMER INFORMATION
  280.  
  281.                *Customer I.D.#
  282.                First Name
  283.                Middle Name
  284.                Last Name
  285.                Address
  286.                City
  287.                State
  288.                Zip Code
  289.                Home Phone
  290.                Work Phone
  291.                Comments
  292.                Last Invoice Date
  293.                Balance Due
  294.  
  295.                INVOICE INFORMATION
  296.  
  297.                *Customer I.D.#
  298.                Customer Name
  299.                Invoice Number
  300.                Invoice Date
  301.                Subtotal Price
  302.                Tax Amount
  303.                Total Price
  304.  
  305.           When these panels are linked together, the common field
  306.           (Customer ID) lets DataPerfect know which invoices are
  307.           for which customer.
  308.  
  309.           If the lists for two panels you want to link do not
  310.           have any fields in common, you need to add a field to
  311.           one or both lists.  You cannot link two panels which do
  312.           not have at least one field in common.
  313.  
  314.           The common fields between the other panels are shown
  315.           below.
  316.  
  317.                CUSTOMER INFORMATION
  318.  
  319.                *Customer I.D.#
  320.                First Name
  321.                Middle Name
  322.                Last Name
  323.                Address
  324.                City
  325.                State
  326.                Zip Code
  327.                Home Phone
  328.                Work Phone
  329.                Comments
  330.                Last Invoice Date
  331.                Balance Due
  332.  
  333.                CUSTOMER PAYMENTS
  334.  
  335.                *Customer I.D.#
  336.                Customer Name
  337.                Payment Date
  338.                Payment Amount
  339.  
  340.  
  341.                INVOICE INFORMATION
  342.  
  343.                *Customer I.D.#
  344.                Customer Name
  345.                **Invoice Number
  346.                Invoice Date
  347.                Subtotal Price
  348.                Tax Amount
  349.                Total Price
  350.  
  351.  
  352.                ITEMS PURCHASED BY CUSTOMER
  353.  
  354.                **Invoice Number
  355.                ***Item
  356.                ***Item Price
  357.                Quantity
  358.                Extended Price
  359.  
  360.  
  361.                INVENTORY
  362.  
  363.                ***Item
  364.                ***Item Price
  365.  
  366.   Review
  367.  
  368.           After reading this lesson, you should be able to answer
  369.           the following questions:
  370.  
  371.           -    What is normalization and why is it important?
  372.           -    What is required to link two panels? €  Creating a Database 3:  Designing Panels
  373.  
  374.           After you have assessed your database needs and grouped
  375.           the related information, you need to design panels to
  376.           organize the data on-screen.  A panel is a box-shaped
  377.           template which is used to display a DataPerfect record.
  378.  
  379.           In this lesson you sketch a panel for each data group
  380.           you assembled in Lesson 2 under Creating a Database. 
  381.           You first organize and label the fields for the panel,
  382.           then add symbols for panel links and data links between
  383.           the panels.  Finally, you add a window to the Invoices
  384.           panel to show records from the Items Purchased panel.
  385.  
  386.   Concepts
  387.  
  388.           While reading through this lesson, you are introduced
  389.           to the following concepts:
  390.  
  391.           -    A panel can contain headings, labels, or other
  392.                text.
  393.           -    A panel link appears as a rectangle (±).
  394.           -    A data link appears as a diamond.
  395.           -    A source panel is the panel from which you access
  396.                another panel through a link.
  397.           -    A destination panel is the panel accessed through
  398.                a link.
  399.           -    A panel link lets you define a window in a source
  400.                panel.  A window displays information from related
  401.                records in the destination panel.
  402.  
  403.   Design Panels
  404.  
  405.           Begin your first panel design by sketching the outline
  406.           of the panel.
  407.  
  408.           The fields for the first panel come from the Customer
  409.           Information list you compiled in Lesson 2 for Creating
  410.           a Database.  A panel can contain text to label both the
  411.           panel and its fields.  When you sketch a panel, use
  412.           rectangles to represent individual fields, and include
  413.           the same labels you want in the actual on-screen panel.
  414.  
  415. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  416. ≥                   Customer Information                         ≥
  417. ≥                                                                ≥
  418. ≥Customer ID €€€€€                                               ≥
  419. ≥Last Name €€€€€€€€€€€€€€€€ First €€€€€€€€€ Middle€€€€€€€€€€€€€€€≥
  420. ≥                                                                ≥
  421. ≥Address                        City            ST ZIP           ≥
  422. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€ €€ €€€€€€€€€€    ≥
  423. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ HM Phone €€€€€€€ WK Phone €€€€€€€≥
  424. ≥                                                                ≥
  425. ≥Comments                                                        ≥
  426. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€      Last Inv. Date €€€€€€€€€€≥
  427. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€                               ≥
  428. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€      Balance Due €€€€€€€€€€€€€≥
  429. ≥                                                                ≥
  430. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  431.  
  432.  
  433.           You can include horizontal lines as part of a panel's
  434.           design to divide it into related sections.  Later in
  435.           this lesson you will add two panel links to the
  436.           Customer Information panel.  These can be separated
  437.           from the main body of the panel by a line.
  438.  
  439.           The other panels will appear as they are shown below.
  440.  
  441.          
  442. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  443. ≥                         Invoices                        ≥
  444. ≥                                                         ≥
  445. ≥Customer ID €€€€€                                        ≥
  446. ≥Name€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ≥
  447. ≥Invoice Number €€€€€ Date €€€€€€€€                       ≥
  448. ≥                          €€€€€€                         ≥
  449. ≥Items Purchased                Price  QTY  Ext. Price    ≥
  450. ≥                                                         ≥
  451. ≥                                                         ≥
  452. ≥                                                         ≥
  453. ≥                                                         ≥
  454. ≥                                                         ≥
  455. ≥                              Subtotal  €€€€€€€€€€€€     ≥
  456. ≥                              Tax         €€€€€€€€€€     ≥
  457. ≥                              Total   €€€€€€€€€€€€€€     ≥
  458. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  459.  
  460.            
  461. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  462. ≥                 Items Purchased                      ≥
  463. ≥                                                      ≥
  464. ≥ Invoice Number €€€€€                                 ≥
  465. ≥                                                      ≥
  466. ≥ Item                           Price QTY   Ext. Price≥
  467. ≥ €€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€ €€€ €€€€€€€€€€€€≥
  468. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  469.  
  470.   Add Panel Links
  471.  
  472.           After you have sketched the basic design for each
  473.           panel, you should add link symbols at the appropriate
  474.           places and add notes to show the panel relationships.
  475.  
  476.           The first links to be added are from the Customer
  477.           Information panel to the Invoices panel and the Payments
  478.           panel.  Because the Customer Information panel is the
  479.           panel from which the other two are accessed, it is called
  480.           the source panel.  The other two panels are destination
  481.           panels.  In Lesson 2:  Grouping Data, the Customer ID
  482.           field was marked with an asterisk (*) as being common to
  483.           the Customer Information panel, the Invoices panel, and
  484.           the Payments panel.
  485.  
  486.                CUSTOMER INFORMATION
  487.  
  488.                *Customer I.D.#
  489.                First Name
  490.                Middle Name
  491.                Last Name
  492.                Address
  493.                City
  494.                State
  495.                ZIP code
  496.                Home Phone
  497.                Work Phone
  498.                Notes/Comments
  499.                Last Invoice Date
  500.                Balance Due
  501.  
  502.                INVOICE INFORMATION
  503.  
  504.                *Customer I.D.#
  505.                Customer Name
  506.                Invoice Number
  507.                Invoice Date
  508.                Subtotal Price
  509.                Tax Amount
  510.                Total Price
  511.  
  512.  
  513.                CUSTOMER PAYMENTS
  514.  
  515.                *Customer I.D.#
  516.                Customer Name
  517.                Payment Date
  518.                Payment Amount
  519.  
  520.           This common field lets you link the Customer
  521.           Information panel to both the Invoices panel and the
  522.           Payments panel.  Each payment or invoice is related to
  523.           only one customer.  This type of relationship is
  524.           accomplished by using a panel link (±).
  525.  
  526.           Panel links are not attached to fields.  They should be
  527.           labeled to show the type of records to which they allow
  528.           access.
  529. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  530. ≥                   Customer Information                         ≥
  531. ≥                                                                ≥
  532. ≥Customer ID €€€€€                                               ≥
  533. ≥Last Name €€€€€€€€€€€€€€€€ First €€€€€€€€€ Middle€€€€€€€€€€€€€€€≥
  534. ≥                                                                ≥
  535. ≥Address                        City            ST ZIP           ≥
  536. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€ €€ €€€€€€€€€€    ≥
  537. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ HM Phone €€€€€€€ WK Phone €€€€€€€≥
  538. ≥                                                                ≥
  539. ≥Comments                                                        ≥
  540. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€      Last Inv. Date €€€€€€€€€€≥
  541. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€                               ≥
  542. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€      Balance Due €€€€€€€€€€€€€≥
  543. ≥                                                                ≥
  544. √ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ¥
  545. ≥                Payments €         Invoices €                   ≥
  546. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  547.  
  548.           Now look at the lists for the Invoices panel and the
  549.           Items Purchased panel.  Notice that the lists have the
  550.           Invoice Number field in common.  Because an invoice may
  551.           have many items purchased, the Invoices panel will be
  552.           the source panel for the panel link.
  553.  
  554.          
  555. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  556. ≥                         Invoices                        ≥
  557. ≥                                                         ≥
  558. ≥Customer ID €€€€€                                        ≥
  559. ≥Name €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€≥
  560. ≥Invoice Number €€€€€ Date €€€€€€€€   Invoice Items €     ≥
  561. ≥                          €€€€€€                         ≥
  562. ≥Items Purchased                Price  QTY  Ext. Price    ≥
  563. ≥                                                         ≥
  564. ≥                                                         ≥
  565. ≥                                                         ≥
  566. ≥                                                         ≥
  567. ≥                                                         ≥
  568. ≥                              Subtotal  €€€€€€€€€€€€     ≥
  569. ≥                              Tax         €€€€€€€€€€     ≥
  570. ≥                              Total   €€€€€€€€€€€€€€     ≥
  571. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  572.  
  573.   Add Data Links
  574.  
  575.           The other type of link used by DataPerfect is a data
  576.           link.  Data links connect records in a many-to-one
  577.           relationship and allow data checking to make sure that
  578.           data entered in a field matches an existing record in
  579.           another panel.  For more information on data checking,
  580.           see DataPerfect Terms (Data Link) under What Is
  581.           DataPerfect?.
  582.  
  583.           Although data links appear as diamonds in DataPerfect,
  584.           they are represented as plus signs (+) in the panels
  585.           below.
  586.  
  587.           Using the Invoices panel as the source panel, add
  588.           a data link to the Customer Information panel.  The
  589.           common field is the Customer ID number.
  590.  
  591.          
  592. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  593. ≥                         Invoices                        ≥
  594. ≥Customer ID +€€€€€                                       ≥
  595. ≥Name€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ≥
  596. ≥Invoice Number €€€€€ Date €€€€€€€€   Invoice Items €     ≥
  597. ≥                          €€€€€€                         ≥
  598. ≥Items Purchased                Price  QTY  Ext. Price    ≥
  599. ≥                                                         ≥
  600. ≥                                                         ≥
  601. ≥                                                         ≥
  602. ≥                                                         ≥
  603. ≥                                                         ≥
  604. ≥                              Subtotal  €€€€€€€€€€€€     ≥
  605. ≥                              Tax         €€€€€€€€€€     ≥
  606. ≥                              Total   €€€€€€€€€€€€€€     ≥
  607. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  608.  
  609.           Next, with the Items Purchased panel as the source
  610.           panel, add connecting data links to the Invoices panel
  611.           and the Items in Stock panel.  You can look at the
  612.           lists you created in Lesson 2:  Grouping Data to
  613.           determine the common fields.
  614.  
  615.            
  616. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  617. ≥                 Items Purchased                      ≥
  618. ≥                                                      ≥
  619. ≥ Invoice Number +€€€€€                                ≥
  620. ≥                                                      ≥
  621. ≥ Item                           Price QTY   Ext. Price≥
  622. ≥ €€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€ €€€ €€€€€€€€€€€€≥
  623. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  624.  
  625.   Add a Window
  626.  
  627.           The Invoices panel presents a problem.  Each invoice
  628.           needs to contain a listing of each item shipped, its
  629.           price, quantity, and extended price.  This information
  630.           doesn't appear in the panel as it is presently
  631.           designed.
  632.  
  633.          
  634. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  635. ≥                         Invoices                        ≥
  636. ≥                                                         ≥
  637. ≥Customer ID +€€€€€                                       ≥
  638. ≥Name €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€≥
  639. ≥Invoice Number €€€€€ Date €€€€€€€€   Invoice Items €     ≥
  640. ≥                          €€€€€€                         ≥
  641. ≥Items Purchased                Price  QTY  Ext. Price    ≥
  642. ≥                                                         ≥
  643. ≥                                                         ≥
  644. ≥                                                         ≥
  645. ≥                                                         ≥
  646. ≥                                                         ≥
  647. ≥                              Subtotal  €€€€€€€€€€€€     ≥
  648. ≥                              Tax         €€€€€€€€€€     ≥
  649. ≥                              Total   €€€€€€€€€€€€€€     ≥
  650. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  651.  
  652.           The fields with the necessary information are found in
  653.           the Items Purchased panel.
  654.  
  655.            
  656. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  657. ≥                 Items Purchased                      ≥
  658. ≥                                                      ≥
  659. ≥ Invoice Number +€€€€€                                ≥
  660. ≥                                                      ≥
  661. ≥ Item                           Price QTY   Ext. Price≥
  662. ≥+€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€ €€€ €€€€€€€€€€€€≥          
  663. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  664.  
  665.           When you use a panel link you have the option of
  666.           defining a window to display related record information
  667.           from the linked panel.  A window lets you display
  668.           fields from the destination panel as part of the source
  669.           panel.
  670.  
  671.           The fields from the destination panels will be
  672.           displayed in columns, so you can add column headings to
  673.           label the information.
  674.  
  675.          
  676. ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
  677. ≥                         Invoices                        ≥
  678. ≥                                                         ≥
  679. ≥Customer ID +€€€€€                                       ≥
  680. ≥Name €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€≥
  681. ≥Invoice Number €€€€€ Date €€€€€€€€   Invoice Items €     ≥
  682. ≥                          €€€€€€                         ≥
  683. ≥Items Purchased               Price  QTY  Ext. Price     ≥
  684. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€     ≥
  685. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€     ≥
  686. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€     ≥
  687. ≥€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€     ≥
  688. ≥                                                         ≥
  689. ≥                              Subtotal  €€€€€€€€€€€€     ≥
  690. ≥                              Tax         €€€€€€€€€€     ≥
  691. ≥                              Total   €€€€€€€€€€€€€€     ≥
  692. ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
  693.  
  694.   Review
  695.  
  696.           After reading this lesson, you should be able to answer
  697.           the following questions:
  698.  
  699.           -    What does a panel contain?
  700.           -    What is the difference between a source panel and
  701.                a destination panel?
  702.           -    What is a related record?
  703.           -    What is a window? €  Creating a Database 4:  Determining Necessary Indexes
  704.  
  705.           In this lesson you plan the indexes needed for the
  706.           Customer Information panel of the CLIENT database.  As
  707.           with other parts of the database, the index design is
  708.           based on the needs of HALVA International.
  709.  
  710.           An index is a sorted list of fields used to locate and
  711.           differentiate between records in a database. 
  712.           DataPerfect requires indexes to establish links and
  713.           lookup lists, and to sort records for reports.  You
  714.           must define at least one index for each panel of a
  715.           database.
  716.  
  717.   Concepts
  718.  
  719.           While reading through this lesson, you are introduced
  720.           to the following concepts:
  721.  
  722.           -    Indexes are necessary for lookup lists.
  723.           -    Indexes are necessary for links.
  724.           -    Indexes are necessary for reports.
  725.           -    Each index needs to contain enough fields to make
  726.                sure each record is unique.
  727.  
  728.   Plan Indexes for Lookup Lists
  729.  
  730.           When planning indexes, the first question you should
  731.           ask yourself is, "How do I want the records sorted?" 
  732.           Sorting is required for both lookup lists and reports.
  733.  
  734.           Lookup lists are used to browse through or find
  735.           records.  When you press Lookup (F8) or Up Arrow, the
  736.           fields in the lookup list for the field the cursor is
  737.           on are displayed in the lookup area.  You can then
  738.           scroll through the records to find the one you desire.
  739.  
  740.           Because a lookup list does not control the order in
  741.           which the records are sorted, you must define indexes
  742.           to sort the fields of the lookup list in the order you
  743.           want them to appear.
  744.  
  745.           Look at the sketch of the Customer Information panel
  746.           from Lesson 3:  Designing Panels.
  747.  
  748.           A lookup list for the Last Name field which sorts
  749.           records by last name would make it easy to find the
  750.           record for a particular customer.  Such a lookup list
  751.           requires an index that also sorts records by last name.
  752.  
  753.                LIST FOR INDEX 1 FOR CUSTOMER INFO. PANEL
  754.  
  755.                Last Name
  756.                First Name
  757.                Middle Name
  758.                Customer I.D.#
  759.  
  760.           This index sorts records by last name.  In the event
  761.           that two or more records have the same last name, they
  762.           are further sorted by first name, then middle initial. 
  763.           If two or more records have identical last, first, and
  764.           middle names, they are sorted further by Customer ID
  765.           number.
  766.  
  767.           Because there may be times when it is necessary to look
  768.           up a record by first name from the First Name field,
  769.           the next index will sort by first name.
  770.  
  771.                LIST FOR INDEX 2 BY FIRST NAME
  772.  
  773.                First Name
  774.                Last Name
  775.                Middle Name
  776.                Customer I.D.#
  777.  
  778.   Plan Indexes for Reports
  779.  
  780.           HALVA International will use the CLIENT database to
  781.           generate mailing labels, letters, and so forth.  Because
  782.           HALVA occasionally mails promotional materials to
  783.           customers living in specific areas, the database needs
  784.           to be able to sort customers by state and by ZIP Code.
  785.           The following indexes make that possible:
  786.  
  787.                LIST FOR INDEX 3 BY STATE
  788.  
  789.                State
  790.                City
  791.                Last Name
  792.                First Name
  793.                Customer I.D.#
  794.  
  795.  
  796.                LIST FOR INDEX 4 BY ZIP CODE
  797.  
  798.                Zip Code
  799.                Customer I.D.#
  800.  
  801.   Plan Indexes for Links
  802.  
  803.           The next question to ask yourself when defining indexes
  804.           is, "What types of indexes are required by the links I
  805.           want to create?"
  806.  
  807.           During the linking process, DataPerfect asks you to
  808.           select an index from the destination panel.  It then
  809.           asks you to define a link field list from the source
  810.           panel.  This link field list consists of the field(s)
  811.           common to both of the linked panels.  The index and the
  812.           link field list are different, but work together to
  813.           form the link.  
  814.  
  815.           When DataPerfect matches records, it compares the data
  816.           in the first field of the link field list against the
  817.           first field in the index.  If the data matches, it then
  818.           compares the second field of the link field list
  819.           against the second field in the index.  If the data
  820.           matches, it continues through the rest of the fields in
  821.           the link field list.
  822.  
  823.           All fields in the link field list must be in the index
  824.           selected from the destination panel.  They must also be
  825.           listed in the same order in both the link field list
  826.           and the index.
  827.  
  828.           The Customer Information panel is the destination panel
  829.           for two links:  one from the Invoices panel and one
  830.           from the Payments panel.  Both of these links use
  831.           Customer ID as the common field between the source and
  832.           destination panels.  This means that the link field
  833.           list for both links will consist of the Customer ID
  834.           field.
  835.  
  836.           Because the link field list (the common fields) must be
  837.           a subset of a Customer Information panel index, at
  838.           least one index needs to include Customer ID as the
  839.           first field.  Although the index can include additional
  840.           fields, it does not need to in this case because each
  841.           Customer ID number will be unique.
  842.  
  843.                LIST FOR INDEX 5
  844.  
  845.                Customer I.D.#
  846.  
  847.   Make Sure Each Index Is Unique
  848.  
  849.           The final question you should ask yourself when
  850.           planning indexes is, "Does each index contain a field
  851.           or combination of fields that will make each record
  852.           unique?"
  853.  
  854.           To understand why this is important, consider the
  855.           following:  If an index contained only a Last Name
  856.           field, records for two people with the same last name
  857.           would appear to be duplicates.
  858.  
  859.           To fix this type of problem, you could add other
  860.           fields, such as First Name and Address.  An easy way to
  861.           make an index unique is to include a field which will
  862.           always be unique, such as an auto-incrementing field. 
  863.           All indexes in a panel are checked to make sure a
  864.           record is unique when the record is saved.
  865.  
  866.           Look over each of the planned indexes.  All of the
  867.           indexes planned for this panel contain the Customer ID
  868.           field.  Because no two customers will ever have the
  869.           same customer number, the Customer ID field will always
  870.           be unique.
  871.  
  872.   Plan Indexes for the Other Panels
  873.  
  874.           Plan indexes for the other panels of the database by
  875.           asking the questions, "How do I want the records
  876.           sorted?"; "What types of indexes are required by the
  877.           links I want to create?"; and "Does each index contain
  878.           a field which makes each record unique?"
  879.  
  880.   Review
  881.  
  882.           After reading this lesson, you should be able to answer
  883.           the following questions:
  884.  
  885.           -    Why are indexes necessary?
  886.           -    What are the index requirements of a link?
  887.           -    What makes an index unique? €  Creating a Database 5:  Defining a Panel
  888.  
  889.           In this lesson you follow the outline you made in
  890.           Lessons 1-4 under Creating a Database to create the
  891.           first panel for the CLIENT database.  The Customer
  892.           Information panel will contain information about HALVA
  893.           International mail order customers.  To create the
  894.           panel, you first name the database, then name the
  895.           panel, then label and define the fields in the panel.
  896.  
  897.           You must define at least one index before you can use a
  898.           database.  Because you do not define indexes for the
  899.           panel in this lesson, you should complete Lesson 6
  900.           under Creating a Database (Defining Indexes) at the
  901.           same time you complete this lesson.
  902.  
  903.   Concepts
  904.  
  905.           The following concepts are discussed in this lesson:
  906.  
  907.           -    The Create a New Database option (1) on the main
  908.                menu lets you create a new database.
  909.  
  910.           -    Create (F9) lets you create a field while you are
  911.                in Define Panel mode.
  912.  
  913.           -    A field format determines the size of a field and
  914.                the type of data it can contain.
  915.  
  916.           -    When a field is created, it can be given a name.
  917.  
  918.           -    Text fields can contain up to 32,000 characters.
  919.  
  920.           -    Display mode indicators control the way a field
  921.                displays data.  They are separated from the field
  922.                format by a double colon (::).
  923.  
  924.           -    Block (Alt-F4), Save (F10), and Move (Ctrl-F4) let
  925.                you copy existing information.
  926.  
  927.   Start the Lesson
  928.  
  929.           To start the lesson,
  930.  
  931.           1    Start DataPerfect Test Drive.
  932.  
  933.           If you need specific instructions for loading the
  934.           DataPerfect Test Drive program on your machine or for
  935.           starting or exiting the program, see Readme.1.
  936.  
  937.   Create a New Database
  938.  
  939.           When you enter the program a list of the databases in
  940.           the current directory appears.
  941.  
  942.           If you are working in a directory which contains all of
  943.           the files included with DataPerfect Test Drive, a
  944.           database called CLIENT2 will also be listed.
  945.           
  946.           To define the new database,
  947.  
  948.           1    Select Create a New Database (1) from the menu.
  949.  
  950.           You are prompted for a name.
  951.  
  952.           2    Enter
  953.  
  954.                     CLIENT
  955.  
  956.                as the database name.
  957.  
  958.           Remember that DataPerfect converts filenames to
  959.           uppercase, even if you type them in lowercase.
  960.  
  961.           When you name a database, DataPerfect creates three
  962.           files.  Each filename begins with the name of the
  963.           database and ends with .STR, .IND, or .TXX (such as,
  964.           CLIENT.STR, CLIENT.IND, and CLIENT.TXX).
  965.  
  966.   Create a Panel
  967.  
  968.           Now that you have named the database, you are prompted
  969.           for a panel filename.
  970.  
  971.           A panel filename should consist of the database name
  972.           followed by a unique extension.  This will allow you to
  973.           easily locate all of the files for a given database. 
  974.           The panel file will contain data from all fields in the
  975.           panel except text fields.  (Text field data is stored
  976.           in the file with the .TXX extension.)
  977.  
  978.           1    Enter
  979.  
  980.                     CLIENT.DAT
  981.  
  982.                as the filename.
  983.  
  984.           You are placed in a blank panel in Define Panel mode. 
  985.           The way you define this panel determines the
  986.           information a record can contain, and the way it will
  987.           be displayed.  The panel filename, CLIENT.DAT, is
  988.           displayed in the top left portion of the panel.  The
  989.           zero that appears next to the filename indicates that
  990.           there are currently no records in the panel.
  991.  
  992.           The box above the blank panel shows keystrokes for
  993.           panel definition.  This box is where help messages will
  994.           appear when you press Help.
  995.  
  996.   Edit the Panel Name
  997.  
  998.           When users enter a database, a panel list appears. 
  999.           This list contains the name of each panel in the
  1000.           database, and allows users to display a panel by moving
  1001.           the cursor to its name and pressing Enter.  To see how
  1002.           the panel you are creating appears on the panel list,
  1003.  
  1004.           1    Press Exit (F7).
  1005.  
  1006.           A warning appears at the top of the screen, and your
  1007.           computer may beep.  You can ignore these.
  1008.  
  1009.           2    Press Exit again to display the panel list.
  1010.  
  1011.           Notice that the panel appears as CLIENT.DAT (the panel
  1012.           filename).  A database containing many panels with
  1013.           similar names could be confusing to users.
  1014.  
  1015.           3    Press Enter to return to the panel you are
  1016.                defining.
  1017.  
  1018.           To make it easier to identify the panel from the panel
  1019.           list, you can edit its name.  The panel filename is the
  1020.           name used to store the data at DOS and does not change
  1021.           when you edit the panel name which appears on the panel
  1022.           list.
  1023.  
  1024.           4    Press Define Panel (Alt-F8) to display the Panel
  1025.                Options menu.
  1026.  
  1027.           5    Select Edit Panel Name (6) from the menu.
  1028.  
  1029.           6    Enter
  1030.  
  1031.                     Customer Information
  1032.  
  1033.                as the new panel name.
  1034.  
  1035.           7    Press Exit (F7) to leave the Panel Options menu
  1036.                and return to the panel in Define Panel mode.
  1037.  
  1038.   Add a Heading
  1039.  
  1040.           When defining a panel, you can include a text heading
  1041.           to describe the panel contents.
  1042.  
  1043.           1    Type
  1044.  
  1045.                     Customer Information
  1046.  
  1047.                as the panel heading.
  1048.  
  1049.           This heading and subsequent field labels are termed
  1050.           panel text.  They are strictly for your use and are not
  1051.           created as fields.
  1052.  
  1053.           To center the heading,
  1054.  
  1055.           2    Press Home, Left Arrow to move the cursor to the
  1056.                left margin of the screen.
  1057.  
  1058.           Now you can center the heading by pressing the Space
  1059.           Bar.  Each time you press the Space Bar, the heading
  1060.           moves one character to the right.
  1061.  
  1062.           3    Use the Space Bar to move the heading to the
  1063.                center of the panel.
  1064.  
  1065.           4    Press Home, Right Arrow to move the cursor to the
  1066.                end of the line.
  1067.  
  1068.   Define the Customer ID Field
  1069.  
  1070.           Now you are ready to label and define the fields
  1071.           included in the panel.  Use the sketch of the Customer
  1072.           Information panel from Lesson 3: Designing Panels
  1073.           as a guide while you define the panel.
  1074.  
  1075.           1    Press Enter twice to insert a blank line below the
  1076.                heading and return the cursor to the left margin.
  1077.  
  1078.           The Customer ID Field is the first field on the sketch
  1079.           for the panel.
  1080.  
  1081.           2    Type
  1082.  
  1083.                     Customer ID
  1084.  
  1085.                as the field label, then press the Space Bar to
  1086.                add a space.
  1087.  
  1088.           Now you can define the actual field.
  1089.  
  1090.           3    Press Create (F9).
  1091.  
  1092.           You are prompted to enter a format for the field.
  1093.  
  1094.           A field format tells DataPerfect the size of the field
  1095.           and the type of data it will contain.
  1096.  
  1097.           4    Enter
  1098.  
  1099.                     G99999::IN
  1100.  
  1101.                to define the Customer ID field as a right-aligned
  1102.                numeric field with five digits.
  1103.  
  1104.           Remember that DataPerfect converts field formats to
  1105.           uppercase, even if you type them in lowercase.
  1106.  
  1107.           The nines in the field format tell DataPerfect that any
  1108.           number from zero to nine can be entered in those
  1109.           spaces.
  1110.  
  1111.           The "I" and "N" at the end of the format are called
  1112.           display mode indicators, and control the way the field
  1113.           displays data in the panel.  Display mode indicators
  1114.           are separated from the field format by a double colon
  1115.           (::).  These particular indicators make the field auto-
  1116.           incrementing (::I) and non-updatable (::N).  The value
  1117.           in this field will increase by one for each record
  1118.           created.  This will give each customer record a unique
  1119.           Customer ID number.
  1120.  
  1121.           You can also give a name to a field.  Naming a field
  1122.           can add flexibility to custom merge files, and you'll
  1123.           learn more about that feature in Lesson 11.  To
  1124.           simplify this lesson about panel definition, you'll
  1125.           skip adding the name.
  1126.  
  1127.           5    Press Enter to accept the field format.
  1128.  
  1129.           6    Press Cancel(F1) to skip naming the field.
  1130.  
  1131.           If you enter the field format incorrectly, move the
  1132.           cursor onto the field, press Edit (F6), then enter the
  1133.           correct format.
  1134.  
  1135.   Define the Last Name Field
  1136.  
  1137.           Now define a field for last names.
  1138.  
  1139.           1    Press Enter to move to the line below the Customer
  1140.                ID field.
  1141.  
  1142.           2    Type
  1143.  
  1144.                     Last Name
  1145.  
  1146.                as the field label, then press the Space Bar.
  1147.  
  1148.           3    Press Create (F9) to create the field and display
  1149.                the format prompt.
  1150.  
  1151.           4    Enter A20 as the field format to define the Last
  1152.                Name field as an alphanumeric field with a maximum
  1153.                length of twenty characters.
  1154.  
  1155.           5    Press Cancel(F1) to skip naming the field.
  1156.  
  1157.   Define the First and Middle Name Fields
  1158.  
  1159.           To define the First and Middle name fields,
  1160.  
  1161.           1    Press the Space Bar to add a space.
  1162.  
  1163.           2    Type
  1164.  
  1165.                     First
  1166.  
  1167.                as a field label, then press the Space Bar.
  1168.  
  1169.           3    Press Create (F9).
  1170.  
  1171.           4    Enter
  1172.  
  1173.                     A15
  1174.  
  1175.           5    Press Cancel(F1) to skip naming the field.
  1176.  
  1177.                as the field format to define the First Name field
  1178.                as alphanumeric with a maximum length of 15
  1179.                characters.
  1180.  
  1181.           6    Press the Space Bar.
  1182.  
  1183.           7    Type
  1184.  
  1185.                     Middle
  1186.  
  1187.                as a field label, then press the Space Bar.
  1188.  
  1189.           8    Press Create (F9), then enter
  1190.  
  1191.                     A15
  1192.  
  1193.                as the field format for the Middle Name field.
  1194.  
  1195.           9    Press Cancel(F1) to skip naming the field.
  1196.  
  1197.   Define Address Information Fields
  1198.  
  1199.           In this panel, the field labels for address information
  1200.           will appear above the actual address fields.
  1201.  
  1202.           1    Press Enter twice to add one blank line below the
  1203.                name fields.
  1204.  
  1205.           2    Type
  1206.  
  1207.                     Address
  1208.  
  1209.                as the Address field label.
  1210.  
  1211.           3    Press the Space Bar 24 times to leave room for the
  1212.                Address field.
  1213.  
  1214.           4    Type
  1215.  
  1216.                     City
  1217.  
  1218.                as the City field label, then press the Space Bar
  1219.                12 times.
  1220.  
  1221.           5    Type
  1222.  
  1223.                     ST
  1224.  
  1225.                as the State field label, then press the Space
  1226.                Bar.
  1227.  
  1228.           6    Type
  1229.  
  1230.                     ZIP
  1231.  
  1232.                as the ZIP Code field label.
  1233.  
  1234.           7    Press Enter to move to the next line.
  1235.  
  1236.           You will define a text field to contain the address
  1237.           information.  This will allow for more than one line of
  1238.           address.  Text fields are variable length fields which
  1239.           hold alphanumeric data and allow you to enter up to
  1240.           32,000 characters.  While the entire area of the field
  1241.           is not displayed on-screen, it can be scrolled onto the
  1242.           screen when necessary.
  1243.  
  1244.           8    Press Create (F9).
  1245.  
  1246.           9    Enter
  1247.  
  1248.                     A30A2
  1249.  
  1250.                as the field format to give the field a display
  1251.                size of two lines 30 characters long.
  1252.  
  1253.           10   Press Cancel(F1) to skip naming the field.
  1254.  
  1255.           Because you added the second A to specify a number of
  1256.           lines, the field is a variable-length text field the
  1257.           display size does not affect the maximum capacity of
  1258.           the text field.
  1259.  
  1260.           Now define the City field.
  1261.  
  1262.           11   Press the Space Bar once to position the cursor
  1263.                directly beneath the City label.
  1264.  
  1265.           12   Press Create (F9).
  1266.  
  1267.           13   Enter
  1268.  
  1269.                     A15
  1270.  
  1271.                as the field format to define the City field as
  1272.                alphanumeric with a maximum of 15 characters.
  1273.  
  1274.           14   Press Cancel(F1) to skip naming the field.
  1275.  
  1276.           15   Press the Space Bar to position the cursor below
  1277.                the State label.
  1278.  
  1279.           16   Press Create (F9).
  1280.  
  1281.           17   Enter
  1282.  
  1283.                     U2::E
  1284.  
  1285.                as the field format to define the State field as
  1286.                an uppercase field which is two characters in
  1287.                length.
  1288.  
  1289.           The display mode indicator ::E is designed for fields
  1290.           where every space available in the field is used in
  1291.           many records.  It automatically moves the cursor to the
  1292.           next field after the current one has been filled.
  1293.  
  1294.           18   Press Cancel(F1) to skip naming the field.
  1295.  
  1296.           19   Press the Space Bar once to move the cursor below
  1297.                the ZIP label.
  1298.  
  1299.           20   Press Create (F9).
  1300.  
  1301.           Because all ZIP Codes are numeric, you will define a
  1302.           numeric field.
  1303.  
  1304.           21   Enter
  1305.  
  1306.                     N99999-9999::E
  1307.  
  1308.                as the field format to define the ZIP Code field
  1309.                as a standard numeric field.
  1310.  
  1311.           22   Press Cancel(F1) to skip naming the field.
  1312.  
  1313.           If your screen looks different from the one in Lesson
  1314.           3: Designing Panels, you can use the Space Bar and
  1315.           Delete to move the labels and fields until they appear
  1316.           in the correct position.
  1317.  
  1318.   Define the Phone Field
  1319.  
  1320.           Next, you create the Phone field.
  1321.  
  1322.           1    Press Enter to move the cursor to the next line.
  1323.  
  1324.           The cursor appears at the second line of the Address
  1325.           field.
  1326.  
  1327.           2    Use the Space Bar to align the cursor below the
  1328.                left edge of the City field.
  1329.  
  1330.           3    Type
  1331.  
  1332.                     Phone
  1333.  
  1334.                as the field label, then press the Space Bar.
  1335.  
  1336.           Because telephone numbers are always numeric and have a
  1337.           standard series of digits, you will define the Phone
  1338.           field format as an auto-enter numeric field similar to
  1339.           the ZIP field.
  1340.  
  1341.           4    Press Create (F9), then enter
  1342.  
  1343.                     N(999) 999-9999::E
  1344.  
  1345.                as the field format.
  1346.  
  1347.           This format will display the telephone number in
  1348.           standard form, and will move the cursor to the next
  1349.           field when the number has been typed by a user.
  1350.  
  1351.           5    Press Cancel(F1) to skip naming the field.
  1352.  
  1353.   Copy a Field
  1354.  
  1355.           The sketch for the Customer Information panel contains
  1356.           fields for both home and work telephone numbers.  So
  1357.           far, you've only created one telephone field in the
  1358.           panel.  You can use Block, Save, and Move to copy that
  1359.           field and create a Work Phone field.
  1360.  
  1361.           1    Use the arrow keys to move the cursor to the "P"
  1362.                in Phone.
  1363.  
  1364.           2    Press Block (Alt-F4).
  1365.  
  1366.           "Block" appears at the top of your screen, indicating
  1367.           Block is on.  The area you are blocking will not appear
  1368.           in reverse video as it does when using Block in
  1369.           WordPerfect word processing software.
  1370.  
  1371.           3    Use Right Arrow to move the cursor to the
  1372.                immediate right of the Phone field.
  1373.  
  1374.           Now you need to save a copy of the blocked text and
  1375.           field.
  1376.  
  1377.           4    Press Save (F10) to store a copy of the blocked
  1378.                area in a temporary memory file.
  1379.  
  1380.           5    With the cursor positioned at the end of the Phone
  1381.                field, press the Space Bar once.
  1382.  
  1383.           6    Press Move (Ctrl-F4) to retrieve a copy of the
  1384.                blocked area.
  1385.  
  1386.           7    Use Left Arrow to move the cursor to the "P" in
  1387.                the first Phone field.
  1388.  
  1389.           8    Type
  1390.  
  1391.                     HM
  1392.  
  1393.                then press the Space Bar.
  1394.  
  1395.           9    Use Right Arrow to move the cursor to the "P" in
  1396.                the second Phone field.
  1397.  
  1398.           10   Type
  1399.  
  1400.                     WK
  1401.  
  1402.                then press the Space Bar.
  1403.  
  1404.   Define a Comments Field
  1405.  
  1406.           Now you create a field for comments.  This field can
  1407.           contain notes concerning customers' special requests,
  1408.           bad checks, late payment histories, or anything else
  1409.           that may be important.  It will be a text field like
  1410.           the Address field.
  1411.  
  1412.           1    Use Right Arrow to move to the end of the WK Phone
  1413.                field.
  1414.  
  1415.           2    Press Enter twice to add an extra line of space
  1416.                below the Address and Phone fields.
  1417.  
  1418.           3    Type
  1419.  
  1420.                     Comments
  1421.  
  1422.                as the field label.
  1423.  
  1424.           4    Press Enter to move the cursor to the line below
  1425.                the label.
  1426.  
  1427.           5    Press Create (F9), then enter
  1428.  
  1429.                     A45A5
  1430.  
  1431.                as the text field format definition.
  1432.  
  1433.           6    Press Cancel(F1) to skip naming the field.
  1434.  
  1435.   Add a Last Invoice Date Field
  1436.  
  1437.           Next, add a field to show the date of the customer's
  1438.           last invoice.
  1439.  
  1440.           1    Press the Space Bar two times, then type
  1441.  
  1442.                     Last Invoice Date
  1443.  
  1444.                as the field label.
  1445.  
  1446.           2    Press the Space Bar six times to align the field
  1447.                with the right edge of the panel.
  1448.  
  1449.           3    Press Create (F9), then enter
  1450.  
  1451.                     D99/99/99::C
  1452.  
  1453.                as the field format.
  1454.  
  1455.           4    Press Cancel(F1) to skip naming the field.
  1456.  
  1457.           The display mode indicator ::C makes the field a
  1458.           computed field.
  1459.  
  1460.   Define the Balance Due Field
  1461.  
  1462.           Now you can define the final field in the panel.  This
  1463.           field will display total invoice amounts minus total
  1464.           payments.
  1465.  
  1466.           1    Press Enter twice to move down two lines.
  1467.  
  1468.           The cursor appears at the left edge of the Comments
  1469.           field.
  1470.  
  1471.           2    Use the Space Bar to move the cursor through the
  1472.                Comments field and position it directly below the
  1473.                "L" in Last Invoice Date.
  1474.  
  1475.           3    Type
  1476.  
  1477.                     Balance Due
  1478.  
  1479.                as the field label.
  1480.  
  1481.           4    Press the Space Bar 5 times.
  1482.  
  1483.           5    Press Create (F9), then enter
  1484.  
  1485.                     G-$ZZ,ZZZ,ZZ9.99::N
  1486.  
  1487.                to format the field as a decimal- or right-aligned
  1488.                non-updatable field.
  1489.  
  1490.           The minus sign between the "G" and the dollar sign
  1491.           allows the field to accept negative values.
  1492.  
  1493.           A user cannot enter a negative number into a field
  1494.           which is not formatted to accept a negative value.
  1495.  
  1496.           Both the "9's" and "Z's" in the field represent places
  1497.           where only numbers may be entered.  The "Z's" suppress
  1498.           leading zeros and allow the negative and dollar signs
  1499.           to float (a floating symbol will always appear next to
  1500.           the first digit of the number, regardless of how many
  1501.           digits the number contains).
  1502.  
  1503.           6    Press Cancel(F1) to skip naming the field.
  1504.  
  1505.           To change the appearance of the panel on-screen, you
  1506.           can use the Space Bar and Delete to alter any spacing
  1507.           between labels and fields.
  1508.  
  1509.           Now that you have completed the panel, you are ready to
  1510.           define its indexes.  You should proceed with Lesson 6:
  1511.           Defining Indexes before exiting the program.
  1512.  
  1513.   Review
  1514.  
  1515.           Having completed this lesson, you should be able to
  1516.           answer the following questions:
  1517.  
  1518.           -    What is the first step in creating a new database?
  1519.           -    How do you create a field?
  1520.           -    What is a field format?
  1521.           -    What is a display mode indicator?
  1522.           -    When do you use a text field?
  1523.           -    How do you use Save and Move to copy an existing
  1524.                field? €  Creating a Database 6:  Defining Indexes
  1525.  
  1526.           Every panel you define must have at least one index. 
  1527.           An index is a sorted list of fields used to locate and
  1528.           distinguish records in a database.  You can have
  1529.           several different indexes in your database so records
  1530.           can be cross-referenced in many different ways.
  1531.  
  1532.           In this lesson, you define the five indexes you listed
  1533.           in Lesson 4: Determining Necessary Indexes for the
  1534.           Customer Information panel.  These indexes will sort
  1535.           records by last name, first name, state, ZIP Code, or
  1536.           Customer ID number.
  1537.  
  1538.   Concepts
  1539.  
  1540.           The following concepts are discussed in this lesson:
  1541.  
  1542.           -    Define Index (Ctrl-F8) lets you create an index.
  1543.           -    Select (F4) lets you select a field to be included
  1544.                in an index.
  1545.           -    Indexes sort according to the order in which you
  1546.                select the index fields.
  1547.  
  1548.   Define a Last Name Index
  1549.  
  1550.           Having completed Lesson 5: Defining a Panel, you
  1551.           should now be in the Customer Information panel in
  1552.           Define Panel mode.  Do not proceed with this lesson if
  1553.           you have not completed Lesson 5.
  1554.  
  1555.           Look at the first index list from Lesson 4: Determining
  1556.           Necessary Indexes.  This index will sort records by last
  1557.           name.
  1558.  
  1559.                INDEX 1 FOR CUSTOMER INFO. PANEL
  1560.  
  1561.                Last Name
  1562.                First Name
  1563.                Middle Name
  1564.                Customer I.D.#
  1565.  
  1566.           To define an index, you go to the Define Index Key
  1567.           Field List screen, then select fields from the panel in
  1568.           the order you want them prioritized in the index.
  1569.  
  1570.           1    Press Define Index (Ctrl-F8) to go to the Define
  1571.                Index Key Field List screen.
  1572.  
  1573.           When selecting fields to define an index, you can press
  1574.           Tab to move to the next field or Shift-Tab to move to
  1575.           the previous field.
  1576.  
  1577.           The first field you need to select is the Last Name
  1578.           field.
  1579.  
  1580.           2    Press Tab to move the cursor to the Last Name
  1581.                field.
  1582.  
  1583.           3    Press Select (F4) to select this as the first
  1584.                field in this index.
  1585.  
  1586.           A "1" appears in the Last Name field, indicating that
  1587.           it is the first field in this index.
  1588.  
  1589.           If you make a mistake while selecting fields, you can
  1590.           press Backspace to delete your last selection, or you
  1591.           can select Delete Last Entry in List (2).
  1592.  
  1593.           Because many people have the same last name, the index
  1594.           needs to contain other fields so it can sort records
  1595.           with identical last names.  This index will contain the
  1596.           other fields from the list you made in Lesson 4 for
  1597.           Creating a Database (First Name, Middle Name, and
  1598.           Customer ID).  The Customer ID field is included
  1599.           because it is unique to each record and will
  1600.           distinguish between records having the same first,
  1601.           middle, and last names.
  1602.  
  1603.           4    Press Select (F4) while the cursor is resting on
  1604.                the First Name field to add that field to this
  1605.                index.
  1606.  
  1607.           5    Press Select (F4) while the cursor is resting on
  1608.                the Middle Name field to add that field to the
  1609.                index.
  1610.  
  1611.           6    Press Shift-Tab to move the cursor to the Customer
  1612.                ID field.
  1613.  
  1614.           7    Press Select (F4) to add the Customer ID field to
  1615.                the index.
  1616.  
  1617.           You've now selected all the fields necessary for this
  1618.           index.
  1619.  
  1620.           The numbers in the fields represent the sorting
  1621.           priority.  As you've defined it, this index first sorts
  1622.           by the Last Name field.  Records with identical Last
  1623.           Name fields are subsorted by the First Name field. 
  1624.           Records with identical Last Name and First Name fields
  1625.           are subsorted by the Middle Name field.  Records with
  1626.           identical first, middle, and last names are subsorted
  1627.           by Customer ID number.
  1628.  
  1629.           8    Press Exit (F7) to save the index and return to
  1630.                the Define Index menu.
  1631.  
  1632.   Define the First Name Index
  1633.  
  1634.           Now you are ready to create the second index.  This
  1635.           index will sort the Customer Information records by
  1636.           first name.
  1637.  
  1638.                LIST FOR INDEX 2 BY FIRST NAME
  1639.  
  1640.                First Name
  1641.                Last Name
  1642.                Middle Name
  1643.                Customer I.D.#
  1644.  
  1645.           1    Select Create Index (1).
  1646.  
  1647.           2    Press Tab twice to move the cursor to the First
  1648.                Name field.
  1649.  
  1650.           3    Press Select (F4) to choose this as the first
  1651.                field in this index. 
  1652.  
  1653.           4    Press Shift-Tab to move to the Last Name field.
  1654.  
  1655.           5    Press Select (F4) to add the Last Name field to
  1656.                the index.
  1657.  
  1658.           6    With the cursor resting on the Middle Name field,
  1659.                select it as the third field for this index.
  1660.  
  1661.           7    Select the Customer ID field as the last field in
  1662.                the index.
  1663.  
  1664.           8    Press Exit (F7) to save the index and return to
  1665.                the Define Index menu.
  1666.  
  1667.   Define the State Index
  1668.  
  1669.           The third index you planned in Lesson 4: Determining
  1670.           Necessary Indexes sorts records according to state.
  1671.  
  1672.                LIST FOR INDEX 3 BY STATE
  1673.  
  1674.                State
  1675.                City
  1676.                Last Name
  1677.                First Name
  1678.                Customer I.D.#
  1679.  
  1680.           1    Select Create Index (1) from the menu options.
  1681.  
  1682.           2    Use Tab to move to the State field.
  1683.  
  1684.           3    Press Select (F4) to select the State field.
  1685.  
  1686.           4    In the same manner, select the City, Last Name,
  1687.                First Name, and Customer ID fields.
  1688.  
  1689.           5    Press Exit (F7) to save the index and return to
  1690.                the Define Index menu.
  1691.  
  1692.   Define the ZIP Index
  1693.  
  1694.           The fourth index will sort records by ZIP Code.
  1695.  
  1696.                LIST FOR INDEX 4 BY ZIP CODE
  1697.  
  1698.                Zip Code
  1699.                Customer I.D.#
  1700.  
  1701.           1    Select Create Index (1).
  1702.  
  1703.           2    Use Tab to move to the ZIP field.
  1704.  
  1705.           3    Press Select (F4) to select the ZIP field.
  1706.  
  1707.           4    In the same manner, select the Customer ID field.
  1708.  
  1709.           5    Press Exit (F7) to save the index and return to
  1710.                the Define Index menu.
  1711.  
  1712.   Define the Customer ID Index
  1713.  
  1714.           The final index will contain only one field.
  1715.  
  1716.                LIST FOR INDEX 5
  1717.  
  1718.                Customer I.D.#
  1719.  
  1720.           1    Select Create Index (1).
  1721.  
  1722.           2    Select the Customer ID field only.
  1723.  
  1724.           3    Press Exit (F7) to save the index.
  1725.  
  1726.           You've now defined all of the indexes necessary for the
  1727.           Customer Information panel.
  1728.  
  1729.           4    Press Exit twice to leave the Define Index menu
  1730.                and exit Define Panel mode.
  1731.  
  1732.   Exit the Panel
  1733.  
  1734.           Now that you have defined the Customer Information
  1735.           panel and its indexes, you can return to the list of
  1736.           databases.
  1737.  
  1738.           1    Press Exit (F7) until you return to the database
  1739.                list.
  1740.  
  1741.           At this point, you can exit DataPerfect or start the
  1742.           next lesson.
  1743.  
  1744.   Review
  1745.  
  1746.           Having completed this lesson, you should be able to
  1747.           answer these questions:
  1748.  
  1749.           -    Why are indexes important?
  1750.           -    How do you select a field for inclusion in an
  1751.                index?
  1752.           -    How do indexes prioritized fields? €  Creating a Database 7:  Defining Lookup Lists
  1753.  
  1754.           You have created a panel, defined fields, and defined
  1755.           indexes.  In this lesson you create a lookup list for
  1756.           the First Name field.  Creating lookup lists is one of
  1757.           the final steps in creating a panel.
  1758.  
  1759.           A database user can perform a lookup by pressing Up
  1760.           Arrow or Lookup (F8) with the cursor on a particular
  1761.           field.  This will display several records in the lookup
  1762.           area of the screen.  The user can scroll through the
  1763.           records to locate a specific record quickly.   
  1764.  
  1765.           A lookup list determines the fields that will be
  1766.           displayed, and the order in which these fields will
  1767.           appear from left to right in the lookup area of the
  1768.           screen.  Because a lookup list does not sort records,
  1769.           you must select an index to be used with each lookup
  1770.           list you define.
  1771.  
  1772.   Concepts
  1773.  
  1774.           The following concepts are discussed in this lesson:
  1775.  
  1776.           -    Up Arrow or Lookup (F8) display the lookup list
  1777.                for the field on which the cursor is resting.
  1778.           -    The Lookup Field List option lets you create a
  1779.                lookup list.
  1780.           -    Select (F4) lets you select a field for inclusion
  1781.                in a lookup list.
  1782.           -    A lookup list is sorted according to the index you
  1783.                select.
  1784.  
  1785.   Start the Lesson
  1786.  
  1787.           To start the lesson,
  1788.  
  1789.           1    Start DataPerfect.
  1790.  
  1791.           2    Move the cursor to the CLIENT database, then press
  1792.                Enter to display a list of panels in the database.
  1793.  
  1794.           Because this database currently contains only one
  1795.           panel, there is only one panel in the list.
  1796.  
  1797.           3    With the cursor on Customer Information, press
  1798.                Enter to display the Customer Information panel.
  1799.  
  1800.   Create a First Name Lookup List
  1801.  
  1802.           Each field in the panel has a default lookup list based
  1803.           on the indexes you defined in Lesson 6: Defining Indexes.
  1804.           If the field on which the cursor rests is listed first in
  1805.           any index, its default lookup list contains all the
  1806.           fields in that index.  If the field on which the cursor
  1807.           rests is not listed first in any index, its default
  1808.           lookup list contains the first field in the panel's first
  1809.           index and the field on which the cursor rests.
  1810.  
  1811.           If you want to change the default lookup list for a
  1812.           field in the panel, you can define one of your own. 
  1813.           The default lookup list for the First Name field
  1814.           consists of First Name, Last Name, Middle Name, and
  1815.           Customer ID.  You can create a lookup list which will
  1816.           list the parts of the customers' names in correct
  1817.           order:  First Name, Middle Name, and Last Name.
  1818.  
  1819.           To create a lookup list for the First Name field,
  1820.  
  1821.           1    Use Tab to move the cursor to the First Name
  1822.                field.
  1823.  
  1824.           2    Press Define Field (Shift-F8) to go to the Field
  1825.                Options menu.
  1826.  
  1827.           3    Select Lookup Field List (1).
  1828.  
  1829.           Now you can select the fields you want to include in
  1830.           the lookup list.
  1831.  
  1832.           4    Use Tab to move the cursor to the First Name
  1833.                field.
  1834.  
  1835.           5    Press Select (F4) to choose this field as the
  1836.                first field to be displayed in this lookup list.
  1837.  
  1838.           6    With the cursor on the Middle Name field, press
  1839.                Select (F4) to include it as the second field to
  1840.                be displayed in this lookup list. 
  1841.  
  1842.           7    Use Shift-Tab to move the cursor to the Last Name
  1843.                field, then press Select (F4) to include it as the
  1844.                third field to be displayed in this lookup list.
  1845.  
  1846.           8    Use Shift-Tab to move the cursor to the Customer
  1847.                ID field, then press Select (F4).
  1848.  
  1849.           Now that you have selected the fields you want to
  1850.           include in this list, you need to select an index to
  1851.           sort them.
  1852.  
  1853.           To choose an index to sort the records in this lookup
  1854.           list,
  1855.  
  1856.           9    Press Exit (F7) to move to the Index Selection
  1857.                screen.
  1858.  
  1859.           You can review the indexes you defined for this panel
  1860.           by using the Up and Down Arrow keys.  The indexes
  1861.           appear as they did when you defined them, with each
  1862.           field's index order represented by a number.
  1863.  
  1864.           10   Use the arrow keys to display the index which
  1865.                lists First Name as 1 (Index 2).
  1866.  
  1867.           11   Press Select (F4).
  1868.  
  1869.           The records displayed in the lookup list will be sorted
  1870.           by the specified index. 
  1871.  
  1872.           The numbers at the bottom of the screen show the index
  1873.           and fields used by the lookup list.  The first number
  1874.           is the number of the index used.  The numbers after the
  1875.           hyphen show which fields have been selected, and the
  1876.           order in which they will appear.
  1877.  
  1878.           The field numbers in this message are based on the
  1879.           order in which the fields were created.
  1880.  
  1881.           12   Press Exit until you return to the database list.
  1882.  
  1883.           The Customer Information panel is now complete. 
  1884.           Although the following lessons guide you through the
  1885.           creation of additional panels, you could use this panel
  1886.           by itself as a flat file database if the information it
  1887.           contains suited all of your needs.  From this panel you
  1888.           could define reports to create mailing labels, sort
  1889.           customers by state, and create merge files for use with
  1890.           WordPerfect word processing software.
  1891.  
  1892.   Review
  1893.  
  1894.           Having completed this lesson you should be able to
  1895.           answer these questions:
  1896.  
  1897.           -    What is a lookup list, and how does it differ from
  1898.                an index?
  1899.           -    How does a user view a lookup list?
  1900.           -    How do you select a field for inclusion in a
  1901.                lookup list?
  1902.           -    How are records sorted in lookup lists? €  Creating a Database 8:  Defining Additional Panels
  1903.  
  1904.           In this lesson you create two additional panels for the
  1905.           CLIENT database.  These panels are the Invoices panel
  1906.           and the Items Purchased panel that you sketched in
  1907.           Lesson 3: Designing Panels.  In later lessons you will
  1908.           link these panels to each other and to the Customer
  1909.           Information panel to track purchases made by individual
  1910.           customers.
  1911.  
  1912.   Concepts
  1913.  
  1914.           The following concepts are discussed in this lesson:
  1915.  
  1916.           -    Insert (Ins) lets you create a new panel in an
  1917.                existing database.
  1918.           -    The Edit Panel Name option on the Panel Options
  1919.                menu lets you change the panel name displayed in
  1920.                the panel list.
  1921.           -    Create (F9) lets you create a field while in
  1922.                Define Panel mode.
  1923.           -    Define Index (Ctrl-F8) lets you create an index.
  1924.           -    Select (F4) lets you select a field to be included
  1925.                in an index.
  1926.  
  1927.   Start the Lesson
  1928.  
  1929.           To start the lesson,
  1930.  
  1931.           1    Start DataPerfect.
  1932.  
  1933.           2    Move the cursor to the CLIENT database, then press
  1934.                Enter to display the panel list.
  1935.  
  1936.   Add the Invoices Panel
  1937.  
  1938.           To add the Invoices panel to the database,
  1939.  
  1940.           1    Press Insert (Ins) to begin creating a new panel
  1941.                for the database.
  1942.  
  1943.           2    Enter CLIENT.INV as the panel filename.
  1944.  
  1945.   Edit the Panel Name
  1946.  
  1947.           To make it easier for database users to identify the
  1948.           panel, you can change its name.  If you do not edit the
  1949.           panel name, DataPerfect uses the panel filename
  1950.           (CLIENT.INV).
  1951.  
  1952.           1    Press Define Panel (Alt-F8) to display the Panel
  1953.                Options menu.
  1954.  
  1955.           2    Select Edit Panel Name (6) from the menu.
  1956.  
  1957.           3    Type
  1958.  
  1959.                     Invoices
  1960.  
  1961.                as the new panel name.
  1962.  
  1963.           4    Press Enter.
  1964.  
  1965.           5    Press Exit (F7) to leave the Panel Options menu
  1966.                and return to the panel in Define Panel mode. 
  1967.  
  1968.   Create a Customer ID Field
  1969.  
  1970.           Look at the sketch created for the Invoices panel in
  1971.           Lesson 3: Designing Panels.
  1972.  
  1973.           As in the Customer Information panel, the Customer ID
  1974.           field is the first field you will define.  Because you
  1975.           will link the two panels, it is important that you use
  1976.           the same field format for the Customer ID field as the
  1977.           one used in the Customer Information panel (G99999).
  1978.  
  1979.           1    Press Enter twice to return the cursor to the next
  1980.                line and add a blank line.
  1981.  
  1982.           You will use this line of space later to add a title to
  1983.           the panel.
  1984.  
  1985.           2    Type
  1986.  
  1987.                     Customer ID
  1988.  
  1989.                as the label for the field, then press the Space
  1990.                Bar to add a space.
  1991.  
  1992.           You can use Delete and Backspace to correct typing
  1993.           errors.  
  1994.  
  1995.           3    Press Create (F9).
  1996.  
  1997.           4    Enter
  1998.  
  1999.                     G99999::N
  2000.  
  2001.                as the field format.
  2002.  
  2003.           If you enter the field format incorrectly, move the
  2004.           cursor onto the field, press Edit (F6), then enter the
  2005.           correct format.
  2006.  
  2007.           You can also give a name to a field.  Naming a field
  2008.           can add flexibility to defining reports, and you'll
  2009.           learn more about that feature in Lesson 11.  To
  2010.           simplify this lesson, you'll skip adding the name.
  2011.  
  2012.           5    Press Cancel(F1) to skip naming the field.
  2013.  
  2014.   Create Other Fields
  2015.  
  2016.           Now you can create additional fields.  These will
  2017.           include Name, Invoice Number, and Date.
  2018.  
  2019.           1    Press Enter to move the cursor to the next line.
  2020.  
  2021.           2    Type
  2022.  
  2023.                     Name
  2024.  
  2025.                as the field label, then press the Space Bar.
  2026.  
  2027.           3    Press Create (F9).
  2028.  
  2029.           The completed version of this database (CLIENT2)
  2030.           contains a formula for the name field which
  2031.           concatenates (combines) the first, middle, and last
  2032.           names from the Customer Information panel.  The
  2033.           combined lengths of the First, Middle, and Last Name
  2034.           fields is 50 characters.  Because there will be a space
  2035.           between each part of the name, this field needs to be
  2036.           52 characters long.
  2037.  
  2038.           4    Enter
  2039.  
  2040.                     A52::C
  2041.  
  2042.                as the field format.
  2043.  
  2044.           The display mode indicator ::C indicates that the data
  2045.           in the field is the result of a computation.  The value
  2046.           in the field will be computed every time the field is
  2047.           displayed.  
  2048.  
  2049.           5    Press Cancel(F1) to skip naming the field.
  2050.  
  2051.           6    Press Enter to move the cursor to the next line.
  2052.  
  2053.           7    Type
  2054.  
  2055.                     Invoice Number
  2056.  
  2057.                as the field label, then press the Space Bar to
  2058.                add a space.
  2059.  
  2060.           8    Press Create (F9), then enter
  2061.  
  2062.                     G99999::I
  2063.  
  2064.                as the field format.
  2065.  
  2066.           9    Press Cancel(F1) to skip naming the field.
  2067.  
  2068.           10   Press the Space Bar to add a space before the next
  2069.                field.
  2070.  
  2071.           11   Type
  2072.  
  2073.                     Date
  2074.  
  2075.                as the field label, then press the Space Bar to
  2076.                add a space.
  2077.  
  2078.           12   Press Create (F9), then enter
  2079.  
  2080.                     D99/99/99::E
  2081.  
  2082.                as the field format.
  2083.  
  2084.           The field type indicator D represents a date field. 
  2085.           You can format a date field to display the day, month,
  2086.           and year in several ways.
  2087.  
  2088.           13   Press Cancel(F1) to skip naming the field.
  2089.  
  2090.   Add a Hidden Field
  2091.  
  2092.           DataPerfect sorts dated records in chronological order. 
  2093.           In the case of invoices, it is preferable to sort them
  2094.           in descending order so that the most recent invoice
  2095.           appears first.  To do this, you need to add one hidden
  2096.           field where a formula will later be placed to invert
  2097.           the date (the completed version of this database,
  2098.           CLIENT 2, contains a formula for this field).  You will
  2099.           also need to define an index that uses the hidden field
  2100.           to sort the dates.
  2101.  
  2102.           1    Press Enter to move the cursor to the next line.
  2103.  
  2104.           2    Use the Space Bar to position the cursor directly
  2105.                below the left edge of the Date field.
  2106.  
  2107.           3    Press Create (F9), then enter
  2108.  
  2109.                     G999999::H
  2110.  
  2111.                to format the field as a right-aligned hidden
  2112.                numeric field.
  2113.  
  2114.           4    Press Cancel(F1) to skip naming the field.
  2115.  
  2116.   Define the Final Fields
  2117.  
  2118.           The sketch for this panel includes a window to display
  2119.           information from the Items Purchased panel.  You won't
  2120.           define the window until you actually link the two
  2121.           panels, but you need to leave space for it.
  2122.  
  2123.           1    Press Enter seven times.
  2124.  
  2125.           Next, you create the Subtotal, Tax, and Total fields in
  2126.           the lower right corner of the panel.
  2127.  
  2128.           2    Press the Space Bar 31 times to move the cursor
  2129.                toward the right side of the screen.
  2130.  
  2131.           This will align the numbers with those displayed in the
  2132.           window you will create.
  2133.  
  2134.           3    Type
  2135.  
  2136.                     Subtotal
  2137.  
  2138.                as the field label, then press the Space Bar
  2139.                twice.
  2140.  
  2141.           4    Press Create (F9), then enter
  2142.  
  2143.                     G-$ZZZ,ZZ9.99::N
  2144.  
  2145.                as the field format.
  2146.  
  2147.           Both the "9's" and "Z's" in the Subtotal, Tax, and
  2148.           Total fields represent places where only numbers may be
  2149.           entered.  The "Z's" suppress leading zeros and allow
  2150.           the negative and dollar signs to float (a floating
  2151.           symbol will always appear next to the first digit of
  2152.           the number, regardless of how many digits the number
  2153.           contains).
  2154.  
  2155.           5    Press Cancel(F1) to skip naming the field.
  2156.  
  2157.           6    Press Enter to move the cursor to the next line.
  2158.  
  2159.           7    Use the Space Bar to move the cursor to a point
  2160.                directly beneath the "S" in the Subtotal field
  2161.                label.
  2162.  
  2163.           8    Type
  2164.  
  2165.                     Tax
  2166.  
  2167.                as the field label, then press the Space Bar nine
  2168.                times.
  2169.  
  2170.           9    Press Create (F9), then enter
  2171.  
  2172.                     G-$Z,ZZ9.99::N
  2173.  
  2174.                as the field format.
  2175.  
  2176.           10   Press Cancel(F1) to skip naming the field.
  2177.  
  2178.           11   Press Enter to move the cursor to the next line.
  2179.  
  2180.           12   Use the Space Bar to move the cursor to a point
  2181.                directly beneath the "T" in the Tax field label.
  2182.  
  2183.           13   Type
  2184.  
  2185.                     Total
  2186.  
  2187.                as the field label, then press the Space Bar three
  2188.                times.
  2189.  
  2190.           14   Press Create (F9), then enter
  2191.  
  2192.                     G-$Z,ZZZ,ZZ9.99::N
  2193.  
  2194.                as the field format.
  2195.  
  2196.           15   Press Cancel(F1) to skip naming the field.
  2197.  
  2198.           Make sure that the right edges of the Subtotal, Tax,
  2199.           and Total fields line up.  This is necessary to
  2200.           decimal-align (right-align) the amounts entered in
  2201.           those fields.
  2202.  
  2203.   Define the Indexes
  2204.  
  2205.           Now that you've defined the panel's fields, you'll
  2206.           create two indexes.  The first index will list the
  2207.           Customer ID field first, the hidden field second, and
  2208.           the Invoice Number field third.  This index will
  2209.           display the most recent invoice for each Customer ID
  2210.           number first, after you add the formula for the hidden
  2211.           field.
  2212.  
  2213.           1    Press Define Index (Ctrl-F8).  
  2214.  
  2215.           As you know, you can use Tab and Shift-Tab to move from
  2216.           field to field while defining an index.
  2217.  
  2218.           2    Press Select (F4) to include the Customer ID field
  2219.                as the first field in this index.
  2220.  
  2221.           3    Use Tab to move the cursor to the hidden field,
  2222.                then press Select (F4) to include it as the second
  2223.                field in the index.
  2224.  
  2225.           4    Use Tab to move the cursor to the Invoice Number
  2226.                field, then press Select (F4) to include it as the
  2227.                final field in the index.
  2228.  
  2229.           5    Press Exit (F7) to save the index.  
  2230.  
  2231.           Now you can create the second index.
  2232.  
  2233.           6    Select Create Index (1), then use the steps above
  2234.                as a guide to define an index listing the Invoice
  2235.                Number first and the Customer ID second.
  2236.  
  2237.           7    Press Exit until you return to the Define Panel
  2238.                screen. 
  2239.  
  2240.   Size and Center the Panel
  2241.  
  2242.           DataPerfect lets you change the display size and
  2243.           location of a panel.  This is especially convenient
  2244.           when you have more than one panel on the screen as you
  2245.           will in future lessons.
  2246.  
  2247.           Make sure Number Lock is off, then,
  2248.  
  2249.           1    Hold down Shift-Left Arrow until you move the
  2250.                right edge of the panel as far left as it can go. 
  2251.                
  2252.           If you have an enhanced keyboard, you must use the
  2253.           arrow keys on the number pad.  If Shift-arrow does not
  2254.           work on your keyboard, try Alt-number (1, 2, 3, and 4).
  2255.  
  2256.           If you are unable to eliminate all of the blanks
  2257.           between the last field and the border, you may have
  2258.           extra spaces or hard returns that you need to delete. 
  2259.           You can use Delete and Backspace to remove them.
  2260.  
  2261.           2    Select Move Panel (F2) to relocate the panel.
  2262.  
  2263.           F2 acts as a toggle between moving and sizing the
  2264.           panel.
  2265.  
  2266.           3    Press Shift-Right Arrow until you center the panel
  2267.                on the screen.
  2268.  
  2269.   Add a Heading
  2270.  
  2271.           Now that you have made the panel the correct size, add
  2272.           a centered heading to the top of the panel.
  2273.  
  2274.           1    Press Home, Home, Up Arrow to move the cursor to
  2275.                the top left corner of the panel.
  2276.  
  2277.           2    Type
  2278.  
  2279.                     Invoices
  2280.  
  2281.                as the panel heading.
  2282.  
  2283.           3    Press Home, Left Arrow to move the cursor back to
  2284.                the beginning of the line.
  2285.  
  2286.           4    Use the Space Bar to center the heading.
  2287.  
  2288.           5    Press Exit (F7) to save the information in the
  2289.                panel and return to the panel list.
  2290.  
  2291.   Create an Items Purchased Panel
  2292.  
  2293.           Now create another panel which will contain records of
  2294.           the items on an invoice.  In a future lesson you will
  2295.           link this panel to the Invoices panel.
  2296.  
  2297.           1    Press Insert (Ins) to begin creating another panel
  2298.                for the CLIENT database.
  2299.  
  2300.           2    Enter
  2301.  
  2302.                     CLIENT.PUR
  2303.  
  2304.                as the filename of the new panel.
  2305.  
  2306.   Edit the Panel Name
  2307.  
  2308.           As with the Invoices panel, you will want to edit the
  2309.           panel name.
  2310.  
  2311.           1    Press Define Panel (Alt-F8) to display the Panel
  2312.                Options menu.
  2313.  
  2314.           2    Select Edit Panel Name (6).  
  2315.  
  2316.           3    Enter
  2317.  
  2318.                     Items Purchased
  2319.  
  2320.                as the new name for the panel.
  2321.  
  2322.           4    Press Exit (F7) to return to the panel.
  2323.  
  2324.   Create the Fields
  2325.  
  2326.           Look at the sketch created for the Items Purchased
  2327.           panel in Lesson 3: Designing Panels.
  2328.  
  2329.           Now create the fields in the Items Purchased panel.
  2330.  
  2331.           1    Press Enter two times to insert a blank line.
  2332.  
  2333.           You will use this space later to add a title to the
  2334.           panel.
  2335.  
  2336.           2    Press the Space Bar once to add a space between
  2337.                the left edge of the panel and the field label.
  2338.  
  2339.           3    Type
  2340.  
  2341.                     Invoice Number
  2342.  
  2343.                as the field label, then press the Space Bar to
  2344.                add a space before the field.
  2345.  
  2346.           Because this field will be used to create a link to the
  2347.           Invoices panel, it must have the same format as the
  2348.           Invoice Number field in that panel.
  2349.  
  2350.           4    Press Create (F9), then enter
  2351.  
  2352.                     G99999::N
  2353.  
  2354.                as the field format.
  2355.  
  2356.           5    Press Cancel(F1) to skip naming the field.
  2357.  
  2358.           6    Press Enter two times to insert a blank line of
  2359.                space.
  2360.  
  2361.           7    Press the Space Bar once to add a space between
  2362.                the left edge of the panel and the field label.
  2363.  
  2364.           8    Type
  2365.  
  2366.                     Item
  2367.  
  2368.                as a field label, then press the Space Bar 27
  2369.                times to allow room for the field.
  2370.  
  2371.           9    Type
  2372.  
  2373.                     Price
  2374.  
  2375.                as the next field label, then press the Space Bar
  2376.                once.
  2377.  
  2378.           10   Type
  2379.  
  2380.                     QTY
  2381.  
  2382.                as the next field label, then press the Space Bar
  2383.                three times.
  2384.  
  2385.           11   Type
  2386.  
  2387.                     Ext. Price
  2388.  
  2389.                as the last field label, then press Enter to move
  2390.                the cursor to the next line.
  2391.  
  2392.           The Ext. (extended) Price field will contain the price
  2393.           multiplied by the quantity.
  2394.  
  2395.           12   Press the Space Bar once to add a space between
  2396.                the left edge of the panel and the field.
  2397.  
  2398.           13   Press Create (F9), then enter
  2399.  
  2400.                     A25
  2401.  
  2402.                as the field format for the item purchased.
  2403.  
  2404.           14   Press Cancel(F1) to skip naming the field.
  2405.  
  2406.           15   Press the Space Bar to add a space between the
  2407.                fields.
  2408.  
  2409.           16   Press Create (F9), then enter
  2410.  
  2411.                     G-$Z,ZZ9.99
  2412.  
  2413.                as the field format for the item price.
  2414.  
  2415.           17   Press Cancel(F1) to skip naming the field.
  2416.  
  2417.           18   Press the Space Bar to add a space between the
  2418.                fields.
  2419.  
  2420.           19   Press Create (F9), then enter
  2421.  
  2422.                     GZZ9
  2423.  
  2424.                as the field format for the quantity field.
  2425.  
  2426.           20   Press Cancel(F1) to skip naming the field.
  2427.  
  2428.           21   Press the Space Bar to add a space between the
  2429.                fields.
  2430.  
  2431.           22   Press Create (F9), then enter
  2432.  
  2433.                     G-$ZZZ,ZZ9.99::N
  2434.  
  2435.                as the field format.
  2436.  
  2437.           23   Press Cancel(F1) to skip naming the field.
  2438.  
  2439.   Define the Indexes
  2440.  
  2441.           You are now ready to define the two indexes needed in
  2442.           this panel.  Following the steps you used to create the
  2443.           indexes for the Invoices panel earlier in this lesson,
  2444.  
  2445.           1    Create an index for the Items Purchased panel which
  2446.                lists the Invoice Number field first and the Item
  2447.                field second.
  2448.  
  2449.           2    Create an index which contains the same fields
  2450.                with the order reversed.
  2451.  
  2452.           When you are finished,
  2453.  
  2454.           3    Press Exit (F7) twice to save the index and return
  2455.                to the panel in Define Panel mode.
  2456.  
  2457.   Size the Panel
  2458.  
  2459.           Once the fields are defined, you can size and relocate
  2460.           the panel.
  2461.  
  2462.           1    Use Shift-Left Arrow to move the right edge of the
  2463.                panel as far left as it will go.
  2464.  
  2465.           2    Use Shift-Up Arrow to move the bottom of the panel
  2466.                as far up as it will go.
  2467.  
  2468.           3    Select Move Panel (F2).
  2469.  
  2470.           4    Use Shift-Right Arrow to center the panel left-to-
  2471.                right.
  2472.  
  2473.           5    Use Shift-Down Arrow to center the panel top-to-
  2474.                bottom.
  2475.  
  2476.   Add a Heading
  2477.  
  2478.           Now that the panel is the correct size, add a heading
  2479.           to the top of the panel.
  2480.  
  2481.           1    Press Home, Home, Up Arrow to move the cursor to
  2482.                the top left corner of the panel.
  2483.  
  2484.           2    Type
  2485.  
  2486.                     Items Purchased
  2487.  
  2488.                as the panel heading.
  2489.  
  2490.           3    Press Home, Left Arrow to return the cursor to the
  2491.                beginning of the line.
  2492.  
  2493.           4    Use the Space Bar to center the heading.
  2494.  
  2495.   Exit the Database
  2496.  
  2497.           After you have defined the Invoices and Items Purchased
  2498.           panels,
  2499.  
  2500.           1    Press Exit (F7) until you exit the CLIENT
  2501.                database.
  2502.  
  2503.   Review
  2504.  
  2505.           Having completed this lesson, you should be able to
  2506.           answer the following questions:
  2507.  
  2508.           -    What is the first step in creating a new panel?
  2509.           -    How do you edit a panel name?
  2510.           -    How do you select a field for inclusion in an
  2511.                index?
  2512.           -    How do you change the size of a panel?
  2513.           -    How do you move a panel you have created to a
  2514.                different position on the screen? €  Creating a Database 9:  Defining Panel Links
  2515.  
  2516.           In this lesson you create panel links which let users
  2517.           move from one panel to another.  Panel links are
  2518.           commonly used to establish a one-to-many relationship.
  2519.  
  2520.           First, you will link the Customer Information panel to
  2521.           the Invoices panel.  This lets users reference Invoice
  2522.           information for a particular customer from the Customer
  2523.           Information panel.
  2524.  
  2525.           Next, you will link the Invoices panel to the Items
  2526.           Purchased panel.  This link lets users reference
  2527.           purchasing information for a particular invoice.
  2528.  
  2529.   Concepts
  2530.  
  2531.           The following concepts are discussed in this lesson:
  2532.  
  2533.           -    A panel link lets users move between panels.
  2534.  
  2535.           -    A source panel contains a link symbol, and is the
  2536.                panel from which you access another panel through
  2537.                a link.
  2538.  
  2539.           -    A destination panel is the panel containing
  2540.                related records which is accessed through a link.
  2541.  
  2542.           -    A target field is the field in the destination
  2543.                panel on which the cursor lands when a user moves
  2544.                through a link.
  2545.  
  2546.           -    A link field list contains the field or fields
  2547.                brought through the link from the source panel. 
  2548.                It is used in connection with a destination panel
  2549.                index to relate common information.
  2550.  
  2551.           -    A window lets users view information contained in
  2552.                a destination panel without having to move to that
  2553.                panel.
  2554.  
  2555.   Start the Lesson
  2556.  
  2557.           To start the lesson,
  2558.  
  2559.           1    Start DataPerfect.
  2560.  
  2561.           2    With the cursor on the CLIENT database, press
  2562.                Enter to display a list of panels in the database.
  2563.  
  2564.   Reorganize the Customer Information Panel
  2565.  
  2566.           The first link you will create for the CLIENT database
  2567.           is a panel link from the Customer Information panel to
  2568.           the Invoices panel.
  2569.  
  2570.           1    Move the cursor to the Customer Information panel,
  2571.                then press Enter to display the panel.
  2572.  
  2573.           The sketch for the Customer Information panel from
  2574.           Lesson 3: Designing Panels shows the link to the
  2575.           Invoices panel separated from the rest of the panel
  2576.           by a horizontal line.
  2577.  
  2578.           Before you define the panel link, you need to
  2579.           reorganize the Customer Information panel to create
  2580.           room for it.  You will then add the line which
  2581.           separates it from the rest of the panel.  These steps
  2582.           are not part of the actual link process.
  2583.  
  2584.           2    Press Define Panel (Alt-F8) to display the Define
  2585.                Panel menu.
  2586.  
  2587.           3    Use Tab to move the cursor to the Comments field.
  2588.  
  2589.           4    Press Edit (F6) to change the field format.
  2590.  
  2591.           The field format appears in the box above the panel.
  2592.  
  2593.           5    Press End to move to the end of the format, then
  2594.                press Backspace to delete the 5. 
  2595.  
  2596.           6    Type 3 to change the display to three lines, then
  2597.                press Enter.
  2598.  
  2599.           Changing the display area of a text field does not
  2600.           change the information contained in the field.  It only
  2601.           changes the amount of information that can be displayed
  2602.           on-screen at one time.
  2603.  
  2604.           7    Press Home, Home, Down Arrow to move the cursor to
  2605.                the immediate right of the Balance Due field.
  2606.  
  2607.           8    Press Enter to move the cursor to the line just
  2608.                below the last display line of the Comments field.
  2609.  
  2610.           You can draw a horizontal line across a panel by
  2611.           including a semicolon as part of the panel definition. 
  2612.           The line will appear when you exit the panel.
  2613.  
  2614.           9    Type a semicolon (;), then press Enter to move to
  2615.                the next line. 
  2616.  
  2617.   Create the Link Character
  2618.  
  2619.           Now you're ready to begin defining the link.  There are
  2620.           five basic steps you need to follow when you create a
  2621.           panel link:
  2622.  
  2623.                1    Create a link character.
  2624.                2    Select a destination panel.
  2625.                3    Select a target field.
  2626.                4    Select an index from the destination panel.
  2627.                5    Create a link field list from the source
  2628.                     panel.
  2629.  
  2630.           Start by labeling and creating the link character.
  2631.  
  2632.           1    Press the Space Bar 35 times so the label for the
  2633.                link will appear at the center of the panel.
  2634.  
  2635.           2    Type
  2636.  
  2637.                Invoices
  2638.  
  2639.                as the link label, then press the Space Bar to add
  2640.                a space.
  2641.  
  2642.           3    Press Down Panel (F5).
  2643.  
  2644.           A one-character, reverse-video box appears.  This is
  2645.           the panel link character.
  2646.  
  2647.           Creating the panel link character does not create the
  2648.           panel link; it is only one of the necessary steps in
  2649.           the link process.  You can add the panel link character
  2650.           when you create a panel, or at any other time before
  2651.           you actually define the link.
  2652.  
  2653.   Select the Destination Panel
  2654.  
  2655.           The next step is to select the destination panel.  This
  2656.           is the panel to which you want to move when you use the
  2657.           link.
  2658.  
  2659.           1    Press Left Arrow to position the cursor on the
  2660.                link symbol (±). 
  2661.  
  2662.           2    Press Down Panel (F5) to begin defining the link.
  2663.  
  2664.           The panel list appears.  You can select the destination
  2665.           panel by moving the cursor to that panel and pressing
  2666.           Enter.  For this link, the Invoices panel is the
  2667.           destination panel.
  2668.  
  2669.           3    Move the cursor to the Invoices panel, then press
  2670.                Enter.
  2671.  
  2672.           The Invoices panel (the destination panel) appears.
  2673.  
  2674.   Select the Target Field
  2675.  
  2676.           Once you are in the destination panel, you must select
  2677.           a target field.  The target field is the field on which
  2678.           the cursor will land when a user moves through the
  2679.           link.  It should be the first field in which users will
  2680.           want to enter data, and is generally the first field
  2681.           that is not common to both panels.
  2682.  
  2683.           In this panel, the Invoice Number field is the first
  2684.           field which is not common to both panels.  However,
  2685.           because it is an auto-incrementing field, its data is
  2686.           entered automatically.  For that reason, you will
  2687.           select the Date field as the target field.
  2688.  
  2689.           1    Use Tab to move the cursor to the Date field.
  2690.  
  2691.           2    Press Select (F4) to choose the Date field as the
  2692.                target field.
  2693.  
  2694.   Select an Index
  2695.  
  2696.           DataPerfect uses two field lists to match related
  2697.           records in linked panels:  (1) one of the indexes you
  2698.           defined for the destination panel, and (2) a link field
  2699.           list you will create from the source panel.
  2700.  
  2701.           The index you select from the destination panel must
  2702.           list the field(s) common to both panels first.  In this
  2703.           example, the Customer ID field is common to both panels
  2704.           and will be used to establish the link.
  2705.  
  2706.           1    Press Select (F4) to select the index that lists
  2707.                the Customer ID field first 
  2708.                (Index 1).
  2709.  
  2710.           You are returned to the Customer Information panel (the
  2711.           source panel).
  2712.  
  2713.   Define a Link Field List
  2714.  
  2715.           The last step in creating a panel link is to define a
  2716.           link field list from the source panel.
  2717.  
  2718.           A link field list must contain the source panel field
  2719.           or fields that are common to the two panels.  This
  2720.           field list is used (with the destination panel index
  2721.           you selected) to match records in the two linked
  2722.           panels.
  2723.  
  2724.           The fields in a link field list must be organized as an
  2725.           ordered subset of the destination panel index you
  2726.           selected.  You must include the first field of the
  2727.           index.  If there are other common fields you must list
  2728.           them in the same order as in the index.  This concept
  2729.           may sound difficult, but it really isn't.
  2730.  
  2731.           The index you selected for the destination panel
  2732.           consists of (1) Customer ID, (2) the hidden field, and
  2733.           (3) Invoice Number.
  2734.  
  2735.           The index and its three possible ordered subsets are
  2736.           shown below:
  2737.  
  2738.                Index (destination panel)
  2739.                Customer ID    hidden    Invoice Number
  2740.  
  2741.                Link Field List (source panel)
  2742.                Customer ID
  2743.  
  2744.                or
  2745.  
  2746.                Customer ID    hidden
  2747.  
  2748.                or
  2749.  
  2750.                Customer ID    hidden    Invoice Number
  2751.  
  2752.           Because there is not a matching hidden field or an
  2753.           Invoice Number field in the source panel (the Customer
  2754.           Information panel), the Customer ID field is the only
  2755.           field common to both panels.  Your link field list
  2756.           should consist of only the Customer ID field.
  2757.  
  2758.           1    Press Select (F4) to choose the Customer ID field
  2759.                for the link field list.
  2760.  
  2761.           2    Press Exit (F7) to save the field list.
  2762.  
  2763.           The message at the top of the screen is the panel link
  2764.           definition.  "Link to Panel:2" indicates that the
  2765.           destination panel (Invoices) is the second panel on the
  2766.           panel list.  "Field4" indicates that the target field
  2767.           (Date) is the fourth field in the destination panel. 
  2768.           "Index1" indicates that the index is the first index
  2769.           for the destination panel, and "Field List to Build
  2770.           Key:1" indicates that the link field list contains the
  2771.           first field (Customer ID) in the source panel.
  2772.  
  2773.           If the message on your screen differs from the one
  2774.           above, select Edit Target Field/Target Index/Field List
  2775.           (1), then redefine the link to make the necessary
  2776.           corrections.
  2777.  
  2778.           3    Press Exit to return to the panel.
  2779.  
  2780.           The panel link is complete.  
  2781.  
  2782.           4    Press Exit to exit Define Panel mode.
  2783.  
  2784.           Notice that the panel link is separated from the rest
  2785.           of the panel by the line you created using a semicolon.
  2786.  
  2787.           5    Press Exit again to return to the panel list.
  2788.  
  2789.   Define the Second Panel Link
  2790.  
  2791.           Next, define a panel link from the Invoices panel to
  2792.           the Items Purchased panel.  This link allows users to
  2793.           reference purchasing information for a particular
  2794.           invoice.  The field common to both panels is Invoice
  2795.           Number.
  2796.  
  2797.           1    Move the cursor to the Invoices panel, then press
  2798.                Enter to display the panel.
  2799.  
  2800.           2    Press Define Panel (Alt-F8).
  2801.  
  2802.           3    Use Tab to move to the Date field, then press End
  2803.                to move to the immediate right of the Date field.
  2804.  
  2805.           4    Press the Space Bar twice, then type Invoice
  2806.                Items.
  2807.  
  2808.           P    Press the Space Bar again to add a space, then
  2809.                press Down Panel (F5) to insert the panel link
  2810.                character.
  2811.  
  2812.           Now you can define the panel link.  The first step is
  2813.           to select the destination panel and target field.
  2814.  
  2815.           6    Press Left Arrow to move the cursor to the panel
  2816.                link character.
  2817.  
  2818.           7    Press Down Panel (F5) to begin defining the link.
  2819.  
  2820.           The panel list appears.
  2821.  
  2822.           8    Move the cursor to the Items Purchased panel, then
  2823.                press Enter to select it as the destination panel.
  2824.  
  2825.           The Items Purchased panel (the destination panel)
  2826.           appears.  Because the Item field is the first field in
  2827.           which a user will need to enter data,
  2828.  
  2829.           9    Use Tab to move to the Item field. 
  2830.  
  2831.           10   Press Select (F4) to select the item as the target
  2832.                field.
  2833.  
  2834.           Now that you've selected the target field, you need to
  2835.           select one of the destination panel's indexes to be
  2836.           used for the link.
  2837.  
  2838.           Because Invoice Number is the field that will be common
  2839.           to both panels, you need to select the index which
  2840.           lists it first (Index 1).
  2841.  
  2842.           11   Press Select (F4) again to select Index 1 as the
  2843.                index for this link.
  2844.  
  2845.           You are returned to the source panel.  The final step
  2846.           is to define a link field list.  The Invoice Number
  2847.           field is the only field common to both panels, so it
  2848.           will be the only field in the link field list.
  2849.  
  2850.           12   Use Tab to move the cursor to the Invoice Number
  2851.                field, then press Select (F4) to choose it as the
  2852.                first (and only) field in the link field list.
  2853.  
  2854.           13   Press Exit (F7) to save the panel link definition.
  2855.  
  2856.           The cursor returns to the Define Panel Link menu and
  2857.           the following message appears:
  2858.  
  2859.           Link to Panel:3 Field2 Index1 Field List to Build Key:3
  2860.  
  2861.           If the message on your screen does not match the one
  2862.           above, select Edit Target Field/Target Index/Field List
  2863.           (1), then make the necessary corrections.
  2864.  
  2865.           14   Press Exit again to leave the menu and return to
  2866.                the panel in Define Panel mode.
  2867.  
  2868.   Create a Window
  2869.  
  2870.           In Lesson 3: Designing Panels, you included a
  2871.           window as part of the design for the Invoices panel.
  2872.  
  2873.           A window lets you display fields from the destination
  2874.           panel as part of the source panel.  The window you will
  2875.           create will display fields from the Items Purchased
  2876.           panel.
  2877.  
  2878.           With the cursor resting on the panel link character,
  2879.  
  2880.           1    Press Down Panel (F5) or Define Field (Shift-F8)
  2881.                to display the Define Panel Link menu.
  2882.  
  2883.           2    Select Define Window for Related Records (2).
  2884.  
  2885.           The Invoices panel is displayed, and a small shaded
  2886.           area appears next to the new link.  This area
  2887.           represents the window you are creating.  
  2888.  
  2889.           3    Press Down Arrow three times to move the window
  2890.                (shaded area) downward.  
  2891.  
  2892.           Remember, if you have an enhanced keyboard, you must
  2893.           use the arrow keys on the number pad.  If Shift-arrow
  2894.           does not work on your keyboard, try Alt-number (1, 2,
  2895.           3, and 4).
  2896.  
  2897.           4    Press Left Arrow until you move the window box to
  2898.                the left edge of the panel.
  2899.  
  2900.           5    Press Shift-Right Arrow until the window spans the
  2901.                full width of the panel.
  2902.  
  2903.           6    Press Shift-Down Arrow to lengthen the window
  2904.                until it includes the line above "Subtotal."
  2905.  
  2906.           7    Press Exit (F7) to save the window and move to the
  2907.                destination panel. 
  2908.  
  2909.           Now you need to select the fields from the destination
  2910.           panel in the order you want them to appear in the
  2911.           window.
  2912.  
  2913.           8    Use Tab to move the cursor to the Item field, then
  2914.                press Select (F4).
  2915.  
  2916.           DataPerfect marks the Item field with a "1" to show
  2917.           that it's the first field that will appear in the
  2918.           window.
  2919.  
  2920.           9    Using the same procedure, select the Price field,
  2921.                then the QTY field, and then the Ext. Price field.
  2922.  
  2923.           10   Press Exit two times to save the window field list
  2924.                and return to the panel in Define Panel Mode.
  2925.  
  2926.   Label the Window
  2927.  
  2928.           The data in the window will appear in columns.  You can
  2929.           create labels above the window to identify the data
  2930.           displayed.  In this panel, you'll use the same labels
  2931.           you used in the Items Purchased panel.
  2932.  
  2933.           1    Press Down Arrow twice to move down two lines.
  2934.  
  2935.           To bold the labels,
  2936.  
  2937.           2    Press Attributes (Shift-F6), then select Bold
  2938.                On/Off (1).
  2939.  
  2940.           3    Type
  2941.  
  2942.                Items Purchased
  2943.  
  2944.                as a label, then press the Space Bar 16 times.
  2945.  
  2946.           The spaces will position the next label over the
  2947.           correct information.
  2948.  
  2949.           4    Type
  2950.  
  2951.                Price
  2952.  
  2953.                as a label, then press the Space Bar twice.
  2954.  
  2955.           5    Type
  2956.  
  2957.                QTY
  2958.  
  2959.                as a label, then press the Space Bar twice.
  2960.  
  2961.           6    Type
  2962.  
  2963.                Ext. Price
  2964.  
  2965.                as the last label.
  2966.  
  2967.           7    Press Attributes, then select Bold On/Off (1) to
  2968.                turn off Bold.
  2969.  
  2970.           You have now finished creating the second panel link
  2971.           and its optional window.
  2972.  
  2973.           8    Press Exit (F7) until you return to the database
  2974.                list.
  2975.  
  2976.   Review
  2977.  
  2978.           Having completed this lesson, you should be able to
  2979.           answer the following questions:
  2980.  
  2981.           -    What is the purpose of a panel link?
  2982.           -    What are the basic steps in creating a panel link?
  2983.           -    What is the difference between a source panel and
  2984.                a destination panel?
  2985.           -    What is a link field list, and why is it
  2986.                necessary?
  2987.           -    What is a window?
  2988.           -    How do you define a window? €  Creating a Database 10:  Defining Data Links
  2989.  
  2990.           As you know, the two types of links used by DataPerfect
  2991.           (panel links and data links) allow movement between a
  2992.           source panel and a destination panel.  In Lesson 9
  2993.           under Creating a Database you created panel links.  In
  2994.           this lesson you will create data links.
  2995.  
  2996.           The first data link you create will link the Invoices
  2997.           panel to the Customer Information panel.  This link can
  2998.           be used to reference existing customer information for
  2999.           a particular invoice (many invoices for one customer). 
  3000.           Data checking will match invoices to their respective
  3001.           customer and protect against typographical errors.
  3002.  
  3003.           The second data link you create will link the Items
  3004.           Purchased panel to the Invoices panel (many items
  3005.           purchased for one invoice).  Data checking will match
  3006.           Items Purchased panel records to Invoices panel
  3007.           records.
  3008.  
  3009.   Concepts
  3010.  
  3011.           The following concepts are discussed in this lesson:
  3012.  
  3013.           -    A data link lets users move between panels in a
  3014.                many-to-one relationship.
  3015.           -    Down Panel (F5) lets you select the destination
  3016.                panel for a link, then takes you to that panel to
  3017.                select a target field and a destination panel
  3018.                index.
  3019.           -    Select (F4) lets you select a field for inclusion
  3020.                in a link field list.
  3021.           -    The No-Create option on the Define Data Link for
  3022.                Field menu is one type of data checking.
  3023.  
  3024.   Start the Lesson
  3025.  
  3026.           To start the lesson,
  3027.  
  3028.           1    Start DataPerfect.
  3029.  
  3030.           2    Move the cursor to the CLIENT database, then press
  3031.                Enter to display the panel list.
  3032.  
  3033.   Create the Data Link
  3034.  
  3035.           The first data link you will create is a link from the
  3036.           Invoices panel to the Customer Information panel.
  3037.  
  3038.           1    Move the cursor to the Invoices panel, then press
  3039.                Enter to display the panel.
  3040.  
  3041.           Unlike a panel link, a data link is attached to a
  3042.           specific field.  Because this first link will use the
  3043.           Customer ID field to match records, it will be attached
  3044.           to that field.
  3045.  
  3046.           2    Press Define Panel (Alt-F8) to enter Define Panel
  3047.                mode.
  3048.  
  3049.           3    Use Tab to move the cursor to the Customer ID
  3050.                field.
  3051.  
  3052.   Select the Destination Panel
  3053.  
  3054.           With the cursor on the correct field, you can begin to
  3055.           define the data link.  You do not add a link character
  3056.           to the panel before defining the link as you did when
  3057.           you created a panel link in Lesson 9: Defining Panel
  3058.           Links.  The link will appear after you finish defining
  3059.           it.
  3060.  
  3061.           1    Press Down Panel (F5) to display the panel list
  3062.                and begin defining the link.
  3063.  
  3064.           For this link, the Customer Information panel is the
  3065.           destination panel.
  3066.  
  3067.           2    Move the cursor to the Customer Information panel,
  3068.                then press Enter to select it as the destination
  3069.                panel.
  3070.  
  3071.   Select the Target Field
  3072.  
  3073.           Once you are in the destination panel, you must select
  3074.           a target field.  The target field is the field on which
  3075.           the cursor will rest when a user moves through the
  3076.           link.  The target field for this link will be the Last
  3077.           Name field.
  3078.  
  3079.           1    Use Tab to move the cursor to the Last Name field,
  3080.                then press Select (F4) to choose it as the target
  3081.                field.
  3082.  
  3083.   Select an Index
  3084.  
  3085.           As with a panel link, DataPerfect uses two field lists
  3086.           to match related records for a data link:  (1) an index
  3087.           from the destination panel, and (2) a link field list
  3088.           you create from the source panel.
  3089.  
  3090.           Because Customer ID is the field common to both panels,
  3091.           the index you select from the destination panel must
  3092.           list it first.
  3093.  
  3094.           1    Use Up Arrow or Down Arrow to move to the index
  3095.                that lists the Customer ID field first (Index 5).
  3096.  
  3097.           2    Press Select (F4).
  3098.  
  3099.   Define a Link Field List
  3100.  
  3101.           The last step in creating a data link is defining a
  3102.           link field list from the source panel.  This link field
  3103.           list functions in the same way as the one you defined
  3104.           for the panel link you created in Lesson 9: Defining
  3105.           Panel Links.  It must be an ordered subset of the
  3106.           destination panel index you selected, and must contain
  3107.           the source panel field or fields that are common to the
  3108.           two panels.  In this case, the common field is the
  3109.           Customer ID field.
  3110.  
  3111.           1    With the cursor on the Customer ID field, press
  3112.                Select (F4) to select it for the link field list.
  3113.  
  3114.           2    Press Exit (F7) to exit the panel.
  3115.  
  3116.   Select a Data Checking Option
  3117.  
  3118.           When a user creates an Invoices record for a customer,
  3119.           it needs to contain the correct Customer ID number to
  3120.           match its related Customer Information record.
  3121.  
  3122.           You can use the No-Create option on the Define Data
  3123.           Link for Field menu to ensure that a related record
  3124.           exists for the value entered in a linked field.  This
  3125.           option prevents users from saving a record if the data
  3126.           in the linked field (the Customer ID field in this
  3127.           case) does not match the data in a destination panel
  3128.           record.  It also lets users retrieve information into
  3129.           the field by pressing Lookup and selecting the desired
  3130.           record from the list of destination panel records.
  3131.  
  3132.           1    Select No-Create (4) from the data link menu.
  3133.  
  3134.           You've now created the first data link.
  3135.  
  3136.           The message at the top of the box shows the link
  3137.           definition.  It shows that Panel 1 is the destination
  3138.           panel, Field 2 of Panel 1 is the target field, Index 5
  3139.           of Panel 1 is the index used by the link, and Field 1
  3140.           of the source panel is the only field in the link field
  3141.           list.
  3142.  
  3143.           The message at the bottom of the box shows that users
  3144.           are not allowed to create a related record if one is
  3145.           not found.
  3146.  
  3147.           If the message on your screen differs from the one
  3148.           above, Select Edit Target Field/Target Index/Field List
  3149.           (1), then redefine the link to make the necessary
  3150.           corrections.
  3151.  
  3152.           2    Press Exit two times to exit the menu and return
  3153.                to the panel.
  3154.  
  3155.           The data link appears as a diamond at the immediate
  3156.           left of the Customer ID field.
  3157.  
  3158.           3    Press Exit to return to the panel list.
  3159.  
  3160.   Create a Second Data Link
  3161.  
  3162.           The second data link you'll create is a link from the
  3163.           Items Purchased panel to the Invoices panel.
  3164.  
  3165.           This link will let users move from an Items Purchased
  3166.           record to its related record in the Invoices panel.  It
  3167.           will also provide data checking to ensure that a
  3168.           related Invoices record exists for each value entered
  3169.           in the Invoice Number field of the Items Purchased
  3170.           panel.
  3171.  
  3172.           1    Move the cursor to the Items Purchased panel, then
  3173.                press Enter to display the panel.
  3174.  
  3175.           2    Press Define Panel (Alt-F8).
  3176.  
  3177.           This link will be attached to the Invoice Number field.
  3178.  
  3179.           3    Use Tab to move the cursor to the Invoice Number
  3180.                field.
  3181.  
  3182.           4    Press Down Panel (F5).
  3183.  
  3184.           Select the destination panel and target field to be
  3185.           used by the link.
  3186.  
  3187.           5    Move the cursor to the Invoices panel, then press
  3188.                Enter to select it as the destination panel.
  3189.  
  3190.           6    Use Tab to move the cursor to the Invoice Number
  3191.                field, then press Select (F4) to select it as the
  3192.                target field.
  3193.  
  3194.           Now you need to select the destination panel index to
  3195.           be used by the link.
  3196.  
  3197.           7    Select the index which lists Invoice Number first
  3198.                (Index 2).
  3199.  
  3200.           Now create a link field list.
  3201.  
  3202.           8    Select the Invoice Number field as the first and
  3203.                only field in the link field list.
  3204.  
  3205.           9    Press Exit (F7) to return to the Define Data Link
  3206.                for Field menu.
  3207.  
  3208.           When a user creates an Items Purchased record for an
  3209.           invoice, it needs to contain the correct Invoice Number
  3210.           to match its related Invoices record.  As with the last
  3211.           data link you created, you'll use data checking to
  3212.           insure that a related record exists for the value
  3213.           entered in the linked field (the Invoice Number field).
  3214.  
  3215.           10   Select No-Create (4) as the data checking option.
  3216.  
  3217.           You have created the second data link.
  3218.  
  3219.           11   Press Exit two times to exit the menu and return
  3220.                to the panel.
  3221.  
  3222.           The data link appears at the immediate left of the
  3223.           Invoice Number field.
  3224.  
  3225.           12   Press Exit to return to the database list.
  3226.  
  3227.   Review
  3228.  
  3229.           Having completed this lesson, you should be able to
  3230.           answer the following questions:
  3231.  
  3232.           -    How does a data link differ from a panel link?
  3233.           -    Which kind of link is usually used for a many-to-
  3234.                one relationship?
  3235.           -    What does the No-Create option on the Define Data
  3236.                Link for Field menu do?
  3237.           -    How is a data link shown on-screen? €  Creating a Database 11:  Defining a Report for a Custom 
  3238.                             Merge File
  3239.  
  3240.           A report is a way of extracting information from a
  3241.           database.  DataPerfect Test Drive comes with a Built-In
  3242.           Short Reports feature; you can also create custom
  3243.           reports.
  3244.  
  3245.           In word processing, merging refers to the process of
  3246.           combining information from at least two sources to
  3247.           produce an entirely new document.  WordPerfect uses two
  3248.           types of files to perform a merge:  (1) a primary merge
  3249.           file containing text and (2) a secondary merge file
  3250.           containing records to be merged into the primary file.
  3251.  
  3252.           In this lesson you will define a report to create a
  3253.           WordPerfect secondary merge file.  This report will be
  3254.           used to create a form letter.
  3255.  
  3256.           You can create form letters in DataPerfect by including
  3257.           the text of the letter in the main body of the report
  3258.           form.  You can also create form letters in WordPerfect
  3259.           and then merge them with DataPerfect records.  This lets
  3260.           you take advantage of the WordPerfect program spell
  3261.           checking, formatting, and printing capabilities.
  3262.  
  3263.           You do not need to have the WordPerfect program installed
  3264.           on your machine to define or run the report.  However,
  3265.           you will need WordPerfect to perform the merge and create
  3266.           the form letter.
  3267.  
  3268.  
  3269.   Concepts
  3270.  
  3271.           The following concepts are discussed in this lesson:
  3272.  
  3273.           Merge R (^R) is displayed as an up down arrow in
  3274.           DataPerfect and is used to designate the end of a field
  3275.           in a WordPerfect secondary merge file.
  3276.           Merge E (^E) is displayed as a club in DataPerfect and
  3277.           is used to designate the end of a record in a
  3278.           WordPerfect secondary merge file.
  3279.           The print mode indicator ;;E truncates trailing zeros
  3280.           from a numeric field.
  3281.           The print mode indicator ;;T truncates trailing spaces
  3282.           from a field.
  3283.  
  3284.  
  3285.   Start the Lesson
  3286.  
  3287.           The database you will use in this lesson is called
  3288.           CLIENT1.  It is a completed version of the database you
  3289.           used in the lessons on creating a database. Because you
  3290.           will be making changes to the database, it is important
  3291.           that you use a copy of the database files on the Test
  3292.           Drive diskette and not the actual files themselves. 
  3293.           This will allow you or others to complete this lesson
  3294.           again in the future.
  3295.  
  3296.  
  3297.   To start the lesson,
  3298.  
  3299.           1    Start DataPerfect.
  3300.  
  3301.           2    Select Change Directory (2), then enter the name of
  3302.                the personal directory to which you copied the
  3303.                CLIENT1 database.
  3304.  
  3305.           3    With the cursor on the CLIENT1 database, press Enter
  3306.                to display the panel list.
  3307.  
  3308.   Define the Report
  3309.  
  3310.           A secondary merge file contains fields and records
  3311.           separated by merge codes.
  3312.  
  3313.           Each field ends with a ^R merge code, and is separated
  3314.           from the other fields by a hard return.  Each merge field
  3315.           may contain one or more DataPerfect fields.
  3316.  
  3317.           Each record ends with a ^E merge code.  WordPerfect
  3318.           creates a new form letter for each record in the
  3319.           secondary file.
  3320.  
  3321.           WordPerfect 5.1 uses the merge code {END FIELD} to
  3322.           designate the end of a field and the merge code {END
  3323.           RECORD} to designate the end of a record.  Because
  3324.           WordPerfect 5.1 also recognizes those codes, you do not
  3325.           need to convert the merge codes of a secondary merge file
  3326.           created in DataPerfect to merge with a 5.1 document.
  3327.  
  3328.           The merge report you create will be used with this
  3329.           WordPerfect primary merge file to create a form letter.
  3330.  
  3331.           The secondary merge file needs to contain seven fields:
  3332.           (1) First Name, (2) Middle Name, (3) Last Name, (4)
  3333.           Address, (5) City, (6) State, and (7) ZIP.  All of this
  3334.           information appears in the Customer Information panel.
  3335.  
  3336.           Move the cursor to the Customer Information panel, then
  3337.           press Enter to display the panel.
  3338.  
  3339.           Press Report/Export (Shift-F7) to move to the report
  3340.           list.
  3341.  
  3342.           You can insert a new report from the report list by
  3343.           pressing Insert.  The new report will be based on the
  3344.           report the cursor is on when you press Insert.  To begin
  3345.           with a blank report form, the cursor must be positioned
  3346.           on the Built-In-Short Reports.
  3347.  
  3348.           With the cursor on Built-In Short Reports, press Insert
  3349.           (Ins) to create the new report.
  3350.  
  3351.           Select Edit Report Name (9), then enter WordPerfect Merge
  3352.           as the report name.
  3353.  
  3354.           Select Edit Report Form (8) to move to the report form.
  3355.  
  3356.   Define the Fields
  3357.  
  3358.           Press Report Options (Ctrl-F7).
  3359.  
  3360.           Press Create Secondary Merge Report (9).
  3361.  
  3362.           The first field in the merge file is the first name of
  3363.           the customer.
  3364.  
  3365.           Press Add Data Field (1).
  3366.  
  3367.           Use Tab to move the cursor to the First Name field, press
  3368.           Select (F4), then enter First Name as the name of the
  3369.           field.
  3370.  
  3371.           The next field to be included is the Middle Name field.
  3372.  
  3373.           Press Add Data Field (1).
  3374.  
  3375.           Use Tab to move the cursor to the Middle Name field,
  3376.           press Select (F4), then enter Middle Name as the name of
  3377.           the field.
  3378.  
  3379.           The next field is the Last Name field.
  3380.  
  3381.           Press Add Data Field (1).
  3382.  
  3383.           Use Shift-Tab to move the cursor to the Last Name field,
  3384.           press Select (F4), then enter Last Name as the name of
  3385.           the field.
  3386.  
  3387.           Now you are ready to select the address fields.
  3388.  
  3389.           Press Add Data Field (1).
  3390.  
  3391.           Use Tab to move the cursor to the Address field, press
  3392.           Select (F4), then enter Address as the name of the field.
  3393.  
  3394.           Press Add Data Field (1).
  3395.  
  3396.           Use Tab to move the cursor to the City field, press
  3397.           Select (F4), then enter City as the name of the field.
  3398.  
  3399.           Press Add Data Field (1).
  3400.  
  3401.           Use Tab to move the cursor to the State field, press
  3402.           Select (F4), then enter State as the name of the field.
  3403.  
  3404.           Press Add Data Field (1).
  3405.  
  3406.           Use Tab to move the cursor to the ZIP Code field, press
  3407.           Select (F4), then enter ZIP as the name of the field.
  3408.  
  3409.           Press Exit (F7) or (0) to return to the report form.
  3410.  
  3411.   Remove Extra Spaces and Zeros
  3412.  
  3413.           With the exception of variable-length text fields, all
  3414.           DataPerfect fields are a fixed length.  A fixed-length
  3415.           field is always the same number of spaces in length,
  3416.           regardless of the number of characters entered in it.
  3417.  
  3418.           If you were to create the secondary merge file now, large
  3419.           spaces would appear between the First Name, Middle Name,
  3420.           and Last Name fields.  Also, extra zeros would be
  3421.           displayed on some Zip Codes.  You can use print mode
  3422.           indicators to remove the unwanted blank spaces and zeros.
  3423.  
  3424.           Use Down Arrow to move to the Report Body section.
  3425.  
  3426.           Place the cursor in the First Name field, which is the
  3427.           first section of reverse-video blocks.
  3428.  
  3429.           Press Edit (F6) to display the field format.
  3430.  
  3431.           Press End to move the cursor to the end of the field
  3432.           format, then enter ;;T.
  3433.  
  3434.           Place the cursor in the Middle Name field, which is the
  3435.           second section of reverse-video blocks.
  3436.  
  3437.           Press Edit (F6), press End, then enter ;;T.
  3438.  
  3439.           Place the cursor in the Last Name field, which is the
  3440.           third section of reverse-video blocks.
  3441.  
  3442.           Press Edit (F6), press End, then enter ;;T.
  3443.  
  3444.           The Address field is a text field, which means that
  3445.           DataPerfect will print all of the information in the text
  3446.           field.  Text fields are self-truncating, so there is no
  3447.           need to add ;;T.
  3448.  
  3449.           Place the cursor in the City field, which is the fifth
  3450.           section of reverse-video blocks.
  3451.  
  3452.           Press Edit (F6), press End, then enter ;;T.
  3453.  
  3454.           Because the postal abbreviations for all states are two
  3455.           letters long, there is no need to truncate the State
  3456.           field.  Place the cursor in the ZIP field, which is the
  3457.           seventh section of reverse-video blocks.
  3458.  
  3459.           Adding ;;E to the ZIP field format deletes all zero
  3460.           subfields from the end of the field.  If the last four
  3461.           digits of the ZIP Code are zeros, DataPerfect prints only
  3462.           the first five digits of the ZIP Code.
  3463.  
  3464.           Press Edit (F6), press End, then enter ;;E.
  3465.  
  3466.           You've now formatted the report to include the seven
  3467.           merge fields for the secondary merge file.
  3468.  
  3469.           Press Exit (F7) to return to the Report menu.
  3470.  
  3471.   Direct the Report Output
  3472.  
  3473.           The first two options on the Report menu, Printer On/Off
  3474.           (1) and Disk File On/Off (2), let you specify the
  3475.           destination of the report.  Because you will use the
  3476.           information generated by the report as a WordPerfect
  3477.           secondary merge file, you need to send the report to
  3478.           disk.
  3479.  
  3480.           If Printer appears as the destination, select Printer
  3481.           On/Off (1) to toggle it off.
  3482.  
  3483.           Select Disk File On/Off (2) to display the File options.
  3484.  
  3485.           Select Create File (1), then enter
  3486.           drive:\directory\customer.mrg as the filename, where
  3487.           drive:\directory represents the path name of a personal
  3488.           drive or directory.
  3489.  
  3490.           If you do not specify a pathname when naming the file, it
  3491.           will be saved in the same directory as the database in
  3492.           which you are working.
  3493.  
  3494.           Now you need to save the information in WordPerfect
  3495.           format.  Selecting Disk File Mode WP/DOS (6) toggles
  3496.           between DOS Text format and WordPerfect format.
  3497.  
  3498.           If the format shown on your screen is DOS Text, select
  3499.           Disk File Mode (6) to toggle to WordPerfect.
  3500.  
  3501.   Run the Report
  3502.  
  3503.           Now you're ready to run the report.  To see the report
  3504.           on screen as well as send it to disk,
  3505.  
  3506.           Press Screen (Ctrl-F3), then select Report Display On/Off
  3507.           (7).
  3508.  
  3509.           Remember that you can use Scroll Lock if you want to see
  3510.           the report one screen at a time.
  3511.           Press Report/Export (Shift-F7) to run the report.
  3512.  
  3513.           The report scrolls on screen.
  3514.  
  3515.           When the report is finished,
  3516.  
  3517.           Press Exit (F7) until you exit the DataPerfect program.
  3518.  
  3519.           If you have WordPerfect installed on your machine, you
  3520.           can now perform the actual merge.
  3521.  
  3522.           Start WordPerfect and Perform the Merge
  3523.  
  3524.           Now you can start WordPerfect and perform the merge.
  3525.  
  3526.           Start WordPerfect.
  3527.  
  3528.           Press Merge/Sort (Ctrl-F9) and select Merge (1).
  3529.  
  3530.           Enter drive:\directory\halva.wkb as the name of the
  3531.           primary file, where drive:\directory represents the
  3532.           pathname of the directory containing the DataPerfect
  3533.           learning files.
  3534.  
  3535.           Enter drive:\directory\customer.mrg as the name of the
  3536.           secondary file, where drive:\directory represents the
  3537.           pathname of the directory to which you saved the report.
  3538.  
  3539.           WordPerfect begins merging the two files.  When the
  3540.           merge is completed the cursor is at the end of the
  3541.           merged letters.
  3542.  
  3543.           Press Home, Home, Up Arrow to move to the beginning of
  3544.           the merged letters.
  3545.  
  3546.           There should be several letters (one for each customer)
  3547.           in the merged document.
  3548.  
  3549.           Press Page Down (PgDn) to scroll through the letters
  3550.           created during the merge.
  3551.  
  3552.           Press Exit (F7), type n to not save the document, and
  3553.           then type y to exit WordPerfect.
  3554.  
  3555.   Review
  3556.  
  3557.           Having completed this lesson, you should be able to
  3558.           answer the following questions:
  3559.  
  3560.           What are merge codes, and why are they necessary?
  3561.           What is the purpose of the print mode indicator ;;T in a
  3562.           report?
  3563.           What is the purpose of the print mode indicator ;;E in a
  3564.           report? €  Creating a Database 12: Defining a Menu
  3565.  
  3566.           DataPerfect lets you create custom menus to simplify user
  3567.           tasks.  Users access a panel or report by choosing a menu
  3568.           option instead of entering and navigating DataPerfect
  3569.           manually.
  3570.  
  3571.   Concepts
  3572.  
  3573.           The following concepts are discussed in this lesson:
  3574.  
  3575.           Menus require careful planning to be effective.
  3576.           Menus are constructed by first designing the text screen,
  3577.           then by assigning actions to the menu items.
  3578.           Many Alt-key combinations are mapped to characters that
  3579.           make constructing a menu easier.
  3580.           A menu prompt field is where the user enters a number to
  3581.           make a selection; it can be placed anywhere on the menu.
  3582.  
  3583.   Start the Lesson
  3584.  
  3585.           The database you will use in this lesson is called
  3586.           CLIENT1.  It is a completed version of the CLIENT
  3587.           database used in the lessons on defining a database,
  3588.           except that it contains data.  Because you will be
  3589.           making changes to the database, it is important that you
  3590.           use a copy of the database files on the Test Drive
  3591.           diskette, and not the actual Learning files themselves.
  3592.           This will allow you or others to complete these lessons
  3593.           again in the future.
  3594.  
  3595.   To start the lesson,
  3596.  
  3597.           1    Start DataPerfect.
  3598.  
  3599.           2    Select Change Directory (2), then enter the name of
  3600.                the personal directory to which you copied the
  3601.                CLIENT1 database.
  3602.  
  3603.           Don't access any other databases before entering CLIENT1,
  3604.           or you may change the default Alt-letter keystrokes that
  3605.           are used later in this lesson.
  3606.  
  3607.           3    With the cursor on the CLIENT1 database, press Enter
  3608.                to display the panel list.
  3609.  
  3610.   Plan the Menu
  3611.  
  3612.           A menu can not only make a database easier to use, but
  3613.           it can also make the interface friendlier.  Before you
  3614.           create a menu, you should decide what items need to be
  3615.           accessible from the menu.
  3616.  
  3617.           The Client1 database has three main areas of use.  The
  3618.           panel used most often is the Customer Information panel,
  3619.           so there should be a menu item that accesses this panel
  3620.           directly.  The other panels are used less frequently, so
  3621.           one menu item could simply access the panel list itself.
  3622.           Users frequently use reports, so the last menu item
  3623.           should access the report list.
  3624.  
  3625.           You should also decide on the appearance of the menu.
  3626.           The simplest design for this menu would be to create a
  3627.           help box across the top of the screen, and a box in the
  3628.           middle of the screen that contains the options.
  3629.  
  3630.   Define the Menu Text Screen
  3631.  
  3632.           The menu text screen contains the information the user
  3633.           will see on the menu screen, and tells the user what
  3634.           number to enter in the prompt field to do specific tasks
  3635.           like running a report or entering a panel.
  3636.  
  3637.           From the panel list, press Define Menu (Alt-F8) to enter
  3638.           menu define mode.
  3639.  
  3640.           The Define Menu options are displayed.
  3641.  
  3642.           Press Create/Edit Menu Text (A).
  3643.  
  3644.           To delete the explanatory text on your screen,
  3645.  
  3646.           Press Down Arrow once, then press Ctrl-End, Delete,
  3647.           Ctrl-End.
  3648.  
  3649.           You'll create an instructions box at the top of the menu
  3650.           screen.  To make this easier, DataPerfect has several
  3651.           Alt-key combinations mapped to the characters used for
  3652.           drawing boxes.  Be sure to use the arrows on the numeric
  3653.           keypad (depending on the type of keyboard you are using,
  3654.           you may not be able to use the arrow keys on the
  3655.           dedicated cursor keypad.)  Num Lock should be off.
  3656.  
  3657.           To position the cursor, press Return twice, press Up
  3658.           Arrow twice, then press the Space Bar twice.
  3659.  
  3660.           To create the corner of the box, press Alt-Q once.
  3661.  
  3662.           To create the top line of the box, press Alt-I 73 times.
  3663.  
  3664.           To create the top right corner of the box, press Alt-E
  3665.           once.
  3666.  
  3667.           Now you'll create the sides of the box.
  3668.  
  3669.           Press Down Arrow once, press the Space Bar twice,
  3670.           then press Alt-U.
  3671.  
  3672.           Press the Space Bar 73 times (to move the cursor to the
  3673.           right side of the box), then press Alt-U.
  3674.  
  3675.           Press Down Arrow once, press the Space Bar twice,
  3676.           then press Alt-Z.
  3677.  
  3678.           To complete the bottom of the box, press Alt-I 73 times,
  3679.           then press Alt-C.
  3680.  
  3681.           Now that the box is complete, you need to type the text
  3682.           in it.
  3683.  
  3684.           Press Up Arrow once, press Ctrl-Left Arrow twice, press
  3685.           Right Arrow twice, then press Insert.
  3686.  
  3687.           You are now in Typeover (replace) mode.  You can toggle
  3688.           between Typeover and Normal modes by pressing Insert.
  3689.           This may be handy if you accidentally press Delete or
  3690.           Backspace.
  3691.  
  3692.           Type the number of the option you want from the
  3693.           menu, then press Enter.
  3694.  
  3695.           Now you will create the box that contains the menu
  3696.           options.
  3697.  
  3698.           Use the Arrow keys to position the cursor on the M of the
  3699.           word Menu in the large box on the screen.
  3700.  
  3701.           Make sure you are still in Typeover mode, then press Left
  3702.           Arrow 9 times, and then type CLIENT1 DATABASE MENU.
  3703.  
  3704.           Press Ctrl-Left Arrow 4 times, Down Arrow 5 times, and
  3705.           Right Arrow 9 times, then type Access Customer
  3706.           Information Panel (1).
  3707.  
  3708.           Press Ctrl-Left Arrow 5 times, Down Arrow twice, then
  3709.           type Access Panel List.
  3710.  
  3711.           In order to align the number of this option with the
  3712.           previous option, you need to move the cursor directly
  3713.           underneath the previous option.
  3714.  
  3715.           Press Up Arrow twice, Ctrl-Right Arrow twice, Down Arrow
  3716.           twice, then type (2).
  3717.  
  3718.           Press Ctrl-Left Arrow 4 times, Down Arrow twice, then
  3719.           type Access Report List.
  3720.  
  3721.           Press Up Arrow twice, Ctrl-Right Arrow once, Down
  3722.           Arrow twice, then type (3).
  3723.  
  3724.           Press Exit (F7) twice to return to the Define Menu
  3725.           Screen.
  3726.  
  3727.   Place the Prompt
  3728.  
  3729.           By default, the prompt field on the menu text screen
  3730.           appears after the last character of menu text.
  3731.  
  3732.           DataPerfect lets you move the prompt field (the field
  3733.           where the user types a menu item number) immediately
  3734.           after the initial creation.  However, if you want to
  3735.           move the prompt field without changing any of the menu
  3736.           text, you must choose this option.
  3737.  
  3738.           Press Move The Menu Prompt (B).
  3739.  
  3740.           Notice that the menu prompt is positioned after
  3741.           Selection.  If you wanted to move it, you would use arrow
  3742.           keys to change its position.
  3743.  
  3744.           Press Enter to save the location and return to the Define
  3745.           Menu Screen.
  3746.  
  3747.   Define the Menu
  3748.  
  3749.           The Define Menu screen is where you assign actions to
  3750.           the menu options you placed in the text screen.
  3751.  
  3752.           To assign the action to the first option,
  3753.  
  3754.           Press Go To Panel (1), then enter 1.
  3755.  
  3756.           Make sure the Customer Information Panel is highlighted,
  3757.           then press Enter twice.
  3758.  
  3759.           Note that the first assignment is P1 (the first panel
  3760.           in the panel list).
  3761.  
  3762.           Press Go To Panel List (4), then enter 2.
  3763.  
  3764.           Press Enter to skip choosing a password.
  3765.  
  3766.           or
  3767.  
  3768.           If you want to increase your database security by
  3769.           assigning a password, enter the password.
  3770.  
  3771.           Press Go To Report List (5), then enter 3.
  3772.  
  3773.           Press Enter to skip choosing a password.
  3774.  
  3775.           or
  3776.  
  3777.           If you want to increase your database security by
  3778.           assigning a password, enter the password.
  3779.  
  3780.           Press Exit (F7) twice to return to the menu and exit the
  3781.           database.
  3782.  
  3783.           With the cursor on CLIENT1, press Enter to access the
  3784.           database.
  3785.  
  3786.           Instead of accessing the panel list, you access the menu
  3787.           you created.
  3788.  
  3789.           Press Exit (F7) to exit the database.
  3790.  
  3791.   Review
  3792.  
  3793.           Having completed this lesson, you should be able to
  3794.           answer the following questions.
  3795.  
  3796.           What is the first step in creating a menu?
  3797.           How do you use the menu text screen?
  3798.           How do you place the prompt field?
  3799.           How do you assign actions to menu items?